| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Depending on the user's warning level, getting certain global variables
may lead to calling `Warning#warn`, which can be redefined by the user.
This fixes another `bootstraptest/test_yjit.rb` failure.
|
|
This catches both the interpreter-JIT and JIT-JIT cases.
Fixes https://github.com/Shopify/ruby/issues/719
|
|
|
|
|
|
|
|
|
|
|
|
* ZJIT: Refactor stats implementations
* s/num_send_dynamic/dynamic_send_count/
|
|
|
|
|
|
Just removing some unneeded tests, outdated comments...etc.
|
|
Don't abort the entire compilation.
Fix https://github.com/Shopify/ruby/issues/700
|
|
|
|
Previously, we only spilled the arguments necessary for the particular
send. In case the callee raises and a rescue resumes the ISEQ, that
did not present a complete stack state. E.g. in `[1, (raise rescue 2)]`
the raise send only spills `self`, when `1` also needs to be spilled.
Spill the whole stack. Adjust parsing for `opt_aref_with` since the
key argument for the send now needs to be described by the frame state
of the send.
This changes the contract for `Insn::SendWithoutBlock` to use arguments
from the interpreter stack as described by its frame state.
|
|
|
|
Co-authored-by: Alan Wu <alansi.xingwu@shopify.com>
Co-authored-by: Max Bernstein <ruby@bernsteinbear.com>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
We can use the `gen_push_opnds` and `gen_pop_opnds` helpers added in #14200 to simplify the code.
|
|
|
|
gen_prepare_call_with_gc() was not enough because of the rb_funcall()
usage in range_init().
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Max Bernstein <rubybugs@bernsteinbear.com>
|
|
|
|
|
|
`toregexp` is fairly similar to `concatstrings`, so this commit extracts
a helper for pushing and popping operands on the native stack.
There's probably opportunity to move some of this into lir (e.g. Alan
suggested a push_many that could use STP on ARM to push 2 at a time),
but I might save that for another day.
|
|
|
|
* ZJIT: Handle ISEQ moves in IseqCall
* ZJIT: Handle ISEQ moves in Invariants
* Let gen_iseq_call take a reference
* Avoid unneeded iter()
|
|
|
|
|
|
|
|
|
|
They don't need it anymore; jit.get_opnd doesn't return Option anymore.
|
|
We have a verifier that runs in debug mode that should prevent this.
Simplify a bunch of call sites.
|
|
This is my first contribution to ZJIT.
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Max Bernstein <ruby@bernsteinbear.com>
|
|
|
|
|
|
|
|
ZJIT: Implement getspecial in ZJIT
Adds support for the getspecial instruction in zjit.
We split getspecial into two instructions, one for special symbols
(`$&`, $'`, etc) and one for special backrefs (`$1`, `$2`, etc).
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
|
|
|
|
|
|
* ZJIT: Add test and implement display for StringIntern HIR
Co-authored-by: Emily Samp <emily.samp@shopify.com>
* ZJIT: Implement StringIntern codegen
Co-authored-by: Emily Samp <emily.samp@shopify.com>
* ZJIT: Fix StringIntern's return type
---------
Co-authored-by: Emily Samp <emily.samp@shopify.com>
|
|
ZJIT: Fix ObjToString rewrite
Currently, the rewrite for `ObjToString` always replaces it with a
`SendWithoutBlock(to_s)` instruction when the receiver is not a
string literal. This is incorrect because it calls `to_s` on the
receiver even if it's already a string.
This change fixes it by:
- Avoiding the `SendWithoutBlock(to_s)` rewrite
- Implement codegen for `ObjToString`
|
|
|
|
When trace_var is used, setting a global variable can cause exceptions
to be raised. We need to prepare for that.
|
|
|
|
Also add a check in the bisect script that can assign blame to the HIR
optimizer.
|
|
Co-authored-by: Alexander Momchilov <alexander.momchilov@shopify.com>
|
|
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
* ZJIT: Remove the need for unwrap() on with_num_bits()
* Fix arm64 tests
* Track the caller of with_num_bits
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
---------
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
|