Commit graph

262 commits

Author SHA1 Message Date
Alan Wu
8173d54020 Factor out jit_jump_to_next_insn 2021-10-20 18:19:32 -04:00
Alan Wu
fbb514f67e Introduce yjit_guard_known_klass() 2021-10-20 18:19:32 -04:00
Alan Wu
a8f7eb2f35 Polymorphic opt_send_without_block 2021-10-20 18:19:32 -04:00
Alan Wu
ec1cbbb07d Get rid of dependency on rb_call_cache 2021-10-20 18:19:32 -04:00
Alan Wu
0cd9120f17 YJIT: hash specialization for opt_aref
Make it lazy and add a hash specialization in addition to the array
specialization.
2021-10-20 18:19:32 -04:00
Alan Wu
db53decad6 Exit reason breakdown for opt_aref 2021-10-20 18:19:32 -04:00
Alan Wu
c04e5188d5 YJIT: use a flat array for finding codegen functions
Simpler and faster.
2021-10-20 18:19:32 -04:00
Alan Wu
927ead9f75 YJIT: unify exits. Patch iseqs only when necessary
* YJIT: unify exits. Patch iseqs only when necessary

This fixes the gotcha that returning YJIT_CANT_COPMILE for an
instruction at entry position leading to infinite loop.

Also, iseq patching is only done only when necessary, which should make
most exits faster.

* Now that exits are the same, return YJIT_CANT_COMPILE
2021-10-20 18:19:32 -04:00
Alan Wu
5d834bcf9f YJIT: lazy polymorphic getinstancevariable
Lazily compile out a chain of checks for different known classes and
whether `self` embeds its ivars or not.

* Remove trailing whitespaces

* Get proper addresss in Capstone disassembly

* Lowercase address in Capstone disassembly

Capstone uses lowercase for jump targets in generated listings. Let's
match it.

* Use the same successor in getivar guard chains

Cuts down on duplication

* Address reviews

* Fix copypasta error

* Add a comment
2021-10-20 18:19:31 -04:00
Maxime Chevalier-Boisvert
c6156e5113 Fix trailing spaces 2021-10-20 18:19:31 -04:00
Aaron Patterson
c15a577eda Make Blocks depend on BOPS
When a BOP is redefined, the BOP redefinition callback will invalidate
any blocks that depend on BOPS.  This allows us to eliminate runtime
checks for BOP redefinition.
2021-10-20 18:19:31 -04:00
Jose Narvaez
4e2eb7695e Yet Another Ruby JIT!
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
2021-10-20 18:19:31 -04:00
Renamed from ujit_codegen.c (Browse further)