| Age | Commit message (Collapse) | Author |
|
|
|
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
This is so we know the specific reason we're exiting this instruction.
Co-authored-by: Aaron Patterson tenderlove@ruby-lang.org
|
|
|
|
|
|
Case labels get half an indent and the opening brace is on the same line
as "switch".
|
|
|
|
|
|
The old heap object check is not as efficient as the one in
jit_guard_known_klass(). Also, the old code saves cfp->sp after popping
the operands off the stack, which might cause the operands to be not
marked by the GC in some circumstances.
|
|
|
|
|
|
When calling "to_s" on an instance of String, the method simply returns
self. In this situation most of the work comes from setting up the
method call. It turns out that both railsbench and liquid-render do this
a lot.
When generating code for opt_send_without_block, we already generate a
known class guard, so we can detect when the receiver is a String
instance. Since gen_send_cfunc() is also used for gen_invokesuper(), and
gen_invokesuper() doesn't generate a known class guard, a new nullable
parameter for specialized codegen function is added.
Closes GH-245
|
|
|
|
It could raise ractor exceptions. The included test didn't run properly
before this change.
|
|
Instead of loading from meory for REG_SP, do a register rename instead.
It's cheaper.
|
|
I noticed that there were two st_table iterators that do exactly the
same thing so I merged them into one.
|
|
|
|
|
|
|
|
|
|
Before this change, when we encounter a constant cache that is specific
to a lexical scope, we unconditionally exit. This change falls back to
the interpreter's cache in this situation.
This should help constant expressions in `class << self`, which is popular
at Shopify due to the style guide.
This change relies on the cache being warm while compiling to detect the
need for checking the lexical scope for simplicity.
|
|
|
|
|
|
YJIT expects the VM to invalidate opt_getinlinecache when updating the
constant cache, and the invalidation used to happen even when YJIT can't
use the cached value.
Once the first invalidation happens, the block for opt_getinlinecache
becomes a stub. When the stub is hit, YJIT fails to compile the
instruction as the cache is not usable. The stub becomes a block that
exits for opt_getinlinecache which can be invalidated again. Some
workloads that bust the interpreter's constant cache can create an
invalidation loop with this behavior.
Check if the cache is usable become doing invalidation to fix this
problem.
In the test harness, evaluate the test script in a lambda instead of a
proc so `return` doesn't return out of the harness.
|
|
In vm_push_frame(), the stack overflow test is done against a
decremented cfp. YJIT wasn't accounting for that in its stack overflow
tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We set it before calling routines and when we are exiting.
|
|
It's already up to date. We set it when we do iseq calls and it's set
properly on entry. If it's not set properly exceptions wouldn't work.
|
|
Follow up for ecb5b383a0c17550b9b27663005049ddac871edb. Now that
YJIT_STATS is defined in yjit.h, it shoudl be the only place that
defines it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This new function will do the write barrier / resize the object / check
frozen for us
|
|
|
|
|
|
Send instructions currently generate the exact same side exit twice.
Cache the exit the first time we generate it. Also add a comment
explaining what side exits do.
Closes GH-117.
|