Age | Commit message (Collapse) | Author |
|
* YJIT: Implement newhash with values
* YJIT: Add test of duphash
* Fix compilation on macos/clang
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
In an effort to minimize build issues on non x64 platforms, we can
decide at build time to not build the bulk of YJIT. This should fix
obscure build errors like this one on riscv64:
yjit_asm.c:137:(.text+0x3fa): relocation truncated to fit: R_RISCV_PCREL_HI20 against `alloc_exec_mem'
We also don't need to bulid YJIT on `--disable-jit-support` builds.
One wrinkle to this is that the YJIT Ruby module will not be defined
when YJIT is stripped from the build. I think that's a fair change as
it's only meant to be used for YJIT development.
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
Previously, options such as "--yjit123" would enable YJIT. Additionally,
the error message for argument parsing mentioned "--jit-..." instead of
"--yjit-...".
|
|
There might be code out there that expect `ruby -v` to print only one
line. Since MJIT shows +JIT in `ruby -v` and RUBY_DESCRIPTION, let's
show +YJIT.
The crash report doesn't show anything about MJIT, so adjust the test.
The "test_ruby_version" test was unaware of RUBY_YJIT_ENABLE and so
was failing when the variable is set and inherited into the children
processes it spawns. Explicitly unset the variable in the test.
|
|
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Exit when the object is frozen, also add tests
|
|
We have a check to ensure we don't have to push args on the stack to
call a cfunc with many args. However we never need to use the stack for
variadic cfuncs, so we shouldn't care about the number of arguments.
|
|
|
|
|
|
This fixes and re-enables invokesuper, replacing the existing guards
with a guard on the method entry for the EP.
|
|
Previously checktype only supported heap objects, however it's not
uncommon to receive an immediate, for example when string interpolating
a Symbol or Integer.
|
|
The FIXME is there so we remember to investigate why insns clears the
temporary array. Is this necessary? If it's not we can remove it from
both.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
|
|
|
|
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
This should have referenced MAX_TEMP_TYPES, not MAX_LOCAL_TYPES.
|
|
Adds yjit support for setting global variables.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: John Hawthorn <john@hawthorn.email>
|
|
Previously, under the scraper, this would side-exit because it was
returning to a C method. Now that we use the jit_func entrypoint, this
test no longer side-exits.
|
|
|
|
|
|
|
|
|
|
|
|
|