summaryrefslogtreecommitdiff
path: root/yjit_core.c
AgeCommit message (Collapse)Author
2021-10-20Re-enable local type tracking, until first callMaxime Chevalier-Boisvert
2021-10-20Assert for running out of branches in all buildsAlan Wu
2021-10-20Introduce concept of YJIT instruction operandsMaxime Chevalier-Boisvert
2021-10-20YJIT: Fancier opt_getinlinecacheAlan Wu
Make sure `opt_getinlinecache` is in a block all on its own, and invalidate it from the interpreter when `opt_setinlinecache`. It will recompile with a filled cache the second time around. This lets YJIT runs well when the IC for constant is cold.
2021-10-20Fix stack-use-after-scope in gen_direct_jump()Alan Wu
ASAN can catch these type of things for us, but the scraper can't handle ASAN :/. To be more resilient to refactoring, extend the lifetime of `generic_ctx` in branch_stub_hit() too.
2021-10-20Add flag bits to avoid compiling stubs multiple times.Maxime Chevalier-Boisvert
Fixes bug involving ractors and branch stubs.
2021-10-20Keep track of local types in the contextMaxime Chevalier-Boisvert
2021-10-20Add ctcx_stack_push_local()Maxime Chevalier-Boisvert
2021-10-20Add comments and asserts for clarityMaxime Chevalier-Boisvert
2021-10-20Readd const argumentsMaxime Chevalier-Boisvert
2021-10-20Fix branch rewrite issueMaxime Chevalier-Boisvert
2021-10-20Update yjit_core.cMaxime Chevalier-Boisvert
2021-10-20YJIT: adjust branch shape properly when target already existsAlan Wu
The old code decides branch->shape based on the write position of the native code block, which is unsound in case the block already exists and no new code is written to the write position. Make this decision with the start address of the target block instead. Also handle when the branch becomes smaller after patching.
2021-10-20Fix type_diff logic after Alan pointed out errorsMaxime Chevalier-Boisvert
2021-10-20Part 1 of improved type tracking logicMaxime Chevalier-Boisvert
2021-10-20Stop all other ractors when patching machine codeAlan Wu
2021-10-20Fix issue with version matching logicMaxime Chevalier-Boisvert
2021-10-20Polymorphic opt_send_without_blockAlan Wu
2021-10-20Get rid of dependency on rb_call_cacheAlan Wu
2021-10-20Tweak include order in yjit_core.cAlan Wu
This is playing it safe. Ruby headers rely on some macros generated by autoconf that affect what system headers behave. We should take care to bring in those configs before including systme headers to stay consistent with the rest of Ruby.
2021-10-20YJIT: lazy polymorphic getinstancevariableAlan Wu
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-20Include ruby/ruby.h before vm_core.hAlan Wu
This is how vm.c does it, and if we don't follow it in yjit compilation units, rb_vm_t would have a conflicting size.
2021-10-20Fix trailing spacesMaxime Chevalier-Boisvert
2021-10-20Yet Another Ruby JIT!Jose Narvaez
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.