| Age | Commit message (Collapse) | Author |
|
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>
|
|
If the LiveRange looks like (idx, idx), we will currently not allocate a
register. This change allocates a register and then immediately
deallocates it.
Fix https://github.com/Shopify/ruby/issues/614
|
|
Its usage was removed in 306d50811dd060d876d1eb364a0d5e6106f5e4f1.
|
|
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.
|
|
It only makes sense for heap objects.
|
|
|
|
* 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.
|
|
Make LIR SSA.
|
|
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`
|
|
Hashing and checking operands for equality is re-entrant. We could later
optimize this to check for hash/eq methods on operands and eliminate if
they don't have side effects, but this is fine for now.
|
|
|
|
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.
|
|
* ZJIT: Avoid splitting add_into/sub_into
* Require add_into/sub_into to take a Reg
|
|
Rust PRs will have a failed CI step if they trigger any warnings.
This helps us stay on top of warnings from new Rust releases and
also ones we accidentally write.
Fix a typo for demo, since this only runs when Rust files are changed.
|
|
* ZJIT: Add --zjit-exec-mem-size
* Add a comment about the limit
|
|
Co-authored-by: Alexander Momchilov <alexander.momchilov@shopify.com>
|
|
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
These `...` ISEQs have a special calling convention in the interpreter
and our stubs and JIT calling convention don't deal well. Reject for now.
Debugged with help from `@tekknolagi` and `tool/zjit_bisect.rb`.
Merely avoiding direct sends is enough to pass the attached test, but also
avoid compiling ISEQs with `...` parameter to limit exposure for now.
`SendWithoutBlock`, which does dynamic dispatch using interpreter code,
seems to handle calling into forwardable ISEQs correctly, so they are
fine -- we can't predict where these dynamic sends land anyways.
|
|
|
|
This is moderately useful just in stdout (copy and paste into a renderer) but potentially more useful alongside a tool that parses stdout looking for `digraph G { ... }` and renders those automatically.
|
|
* 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>
|