summaryrefslogtreecommitdiff
path: root/zjit/src
AgeCommit message (Collapse)Author
2025-05-23ZJIT: Implement find for DefinedMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13430
2025-05-23ZJIT: Mark SideExit as terminatorMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13430
2025-05-23ZJIT: Side-exit into the interpreter on unknown call typesMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13430
2025-05-23ZJIT: Side-exit into the interpreter on unknown opt_newarray_sendMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13430
2025-05-23ZJIT: Side-exit into the interpreter on unknown opcodesMax Bernstein
No need to bail out of compilation completely; we can compile all the code up until that point. Notes: Merged: https://github.com/ruby/ruby/pull/13430
2025-05-23ZJIT: Parse splatarray, concattoarray, pushtoarray into HIR (#13429)Max Bernstein
Notes: Merged-By: k0kubun <[email protected]>
2025-05-23[DOC] ZJIT: `Function::find`: Give advice instead of talking about safetyAlan Wu
Co-Authored-By: Max Bernstein <[email protected]>
2025-05-22ZJIT: Parse newhash into HIRMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13414
2025-05-22ZJIT: Parse duphash into HIRMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13414
2025-05-22ZJIT: Parse getinstancevariable, setinstancevariable into HIR (#13413)Max Bernstein
Notes: Merged-By: k0kubun <[email protected]>
2025-05-22ZJIT: More type level docs in zjit::hir [DOC]Alan Wu
Given `InsnId` is at the top of the file and everywhere, hopefully this will help first time readers. Notes: Merged: https://github.com/ruby/ruby/pull/13399
2025-05-20ZJIT: Allow DCE to remove some CCalls (#13363)Max Bernstein
Allow DCE to remove some CCalls Add `elidable` field that signals that there would be no discernible effect if the call to the method were removed. The default is false. Notes: Merged-By: k0kubun <[email protected]>
2025-05-16ZJIT: Create more ergonomic type profiling API (#13339)Max Bernstein
Notes: Merged-By: k0kubun <[email protected]>
2025-05-16ZJIT: Remove unnecessary cloningMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13355
2025-05-15ZJIT: Bail out of recursive compilation if we can't compile calleeMax Bernstein
Right now we just crash if we can't compile an ISEQ for any reason (unimplemented in HIR, unimplemented in codegen, ...) and this fixes that by bailing out. Notes: Merged: https://github.com/ruby/ruby/pull/13356
2025-05-14ZJIT: Split long `use` line and add a module doc.Alan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/13276
2025-05-14ZJIT: More tests for parsing param formsAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/13276
2025-05-14ZJIT: Infer ArrayExact for the rest parameterAlan Wu
The rest parameter is always a rb_cArray, even when anonymous. (This is different from kw_rest, which can be nil.) Notes: Merged: https://github.com/ruby/ruby/pull/13276
2025-05-14ZJIT: Fix rest parameter not parsed into a BB parameterAlan Wu
Use total parameter size instead of lead parameter size when parsing iseq into hir. Also, copy over IntoUsize for compile-time checked u32->usize cast. Notes: Merged: https://github.com/ruby/ruby/pull/13276
2025-05-14ZJIT: Add IntoUsize, ported from YJITAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/13276
2025-05-12ZJIT: Stop padding side exits (#13295)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
2025-05-11Add yjit/zjit bindings for adding namespaceSatoshi Tagomori
2025-05-09ZJIT: Fix a splitting condition for LHSTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13279
2025-05-09Rename `RB_OBJ_SHAPE` -> `rb_obj_shape`Jean Boussier
As well as `RB_OBJ_SHAPE_ID` -> `rb_obj_shape_id` and `RSHAPE` is now a simple alias for `rb_shape_lookup`. I tried to turn all these into `static inline` but I'm having trouble with `RUBY_EXTERN rb_shape_tree_t *rb_shape_tree_ptr;` not being exposed as I'd expect. Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Rename `rb_shape_get_shape_id` -> `RB_OBJ_SHAPE_ID`Jean Boussier
And `rb_shape_get_shape` -> `RB_OBJ_SHAPE`. Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Refactor `rb_shape_get_next` to return an IDJean Boussier
Also rename it, and change parameters to be consistent with other transition functions. Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Rename `rb_shape_obj_too_complex` -> `rb_shape_obj_too_complex_p`Jean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-09Rename `rb_shape_get_shape_by_id` -> `RSHAPE`Jean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/13283
2025-05-08ZJIT: Temporarily revert path compressionMax Bernstein
For reasons I don't understand yet, this causes an issue when trying to boot yjit-bench. Temporarily revert it. Notes: Merged: https://github.com/ruby/ruby/pull/13268 Merged-By: XrXr
2025-05-08Move `object_id` in object fields.Jean Boussier
And get rid of the `obj_to_id_tbl` It's no longer needed, the `object_id` is now stored inline in the object alongside instance variables. We still need the inverse table in case `_id2ref` is invoked, but we lazily build it by walking the heap if that happens. The `object_id` concern is also no longer a GC implementation concern, but a generic implementation. Co-Authored-By: Matt Valentine-House <[email protected]> Notes: Merged: https://github.com/ruby/ruby/pull/13159
2025-05-08Refactor OBJ_TOO_COMPLEX_SHAPE_ID to not be referenced outside shape.hJean Boussier
Also refactor checks for `->type == SHAPE_OBJ_TOO_COMPLEX`. Notes: Merged: https://github.com/ruby/ruby/pull/13159
2025-05-08Rename `ivptr` -> `fields`, `next_iv_index` -> `next_field_index`Jean Boussier
Ivars will longer be the only thing stored inline via shapes, so keeping the `iv_index` and `ivptr` names would be confusing. Instance variables won't be the only thing stored inline via shapes, so keeping the `ivptr` name would be confusing. `field` encompass anything that can be stored in a VALUE array. Similarly, `gen_ivtbl` becomes `gen_fields_tbl`. Notes: Merged: https://github.com/ruby/ruby/pull/13159
2025-05-07Parse topn, opt_length, opt_size into HIRMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13243
2025-05-05Make rb_shape.capacity an `attr_index_t`Jean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/13257
2025-05-02ZJIT: Parse opt_newarray_send into HIR (#13242)Max Bernstein
Notes: Merged-By: k0kubun <[email protected]>
2025-05-02YJIT: ZJIT: Share identical glue functionsAlan Wu
Working towards having YJIT and ZJIT in the same build, we need to deduplicate some glue code that would otherwise cause name collision. Add jit.c for this and build it for YJIT and ZJIT builds. Update bindgen to look at jit.c; some shuffling of functions in the output, but the set of functions shouldn't have changed. Notes: Merged: https://github.com/ruby/ruby/pull/13229
2025-04-30ZJIT: Use RefCell to allow path compression in union-find (#13218)Max Bernstein
Use RefCell to allow path compression in union-find When I wrote the original version I didn't understand the interior mutability pattern, but now I do! With this commit, we should have a more optimal union-find implementation. Notes: Merged-By: k0kubun <[email protected]>
2025-04-30ZJIT: Compile opt_new to slow-path SendWithoutBlock (#13216)Max Bernstein
Notes: Merged-By: k0kubun <[email protected]>
2025-04-29Make sure to call find() on basic block argumentsMax Bernstein
This ensures basic block arguments keep instructions alive, etc. Notes: Merged: https://github.com/ruby/ruby/pull/13204
2025-04-29Default instruction output type to AnyMax Bernstein
If we're adding a bunch of instructions in the middle of an optimization pass, we don't want to use their (currently uninitialized) types because they start as Empty, and Empty is a subtype of everything. This breaks some optimizations. This Any will get refined the next time we call infer_types. Notes: Merged: https://github.com/ruby/ruby/pull/13204
2025-04-29ZJIT: Handle ZJIT options properly (#13197)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
2025-04-28ZJIT: Replace GetConstantPath with Const if the IC is not empty (#13183)Max Bernstein
* Add rb_zjit_constcache_shareable * Add rb_zjit_multi_ractor_p * Replace GetConstantPath with Const if the IC is not empty Notes: Merged-By: k0kubun <[email protected]>
2025-04-28ZJIT: Drop a duplicated call into optimize (#13196)Takashi Kokubun
* ZJIT: Drop a duplicated call into optimize * Update a comment Co-authored-by: Max Bernstein <[email protected]> --------- Co-authored-by: Max Bernstein <[email protected]> Notes: Merged-By: k0kubun <[email protected]>
2025-04-28ZJIT: Drop trace_zjit_* instructions (#13189)Takashi Kokubun
Notes: Merged-By: k0kubun <[email protected]>
2025-04-25maybe fix bindgenAaron Patterson
2025-04-25ZJIT: Bail out of HIR translation if we can't handle a send flag (#13182)Max Bernstein
Bail out of HIR translation if we can't handle a send flag Notes: Merged-By: k0kubun <[email protected]>
2025-04-25ZJIT: Emit CCall if we know the type statically, not just from profiles (#13173)Max Bernstein
Emit CCall if we know the type statically, not just from profiles Notes: Merged-By: k0kubun <[email protected]>
2025-04-24ZJIT: Fold Send into SendWithoutBlockDirect if we know the class statically ↵Max Bernstein
(#13172) Fold Send into SendWithoutBlockDirect if we know the class statically This applies for constants and also for values where we know the type for other reasons. Notes: Merged-By: k0kubun <[email protected]>
2025-04-24Add testsMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13162
2025-04-24Make type_of use union-findMax Bernstein
Otherwise we might have stale types floating around Notes: Merged: https://github.com/ruby/ruby/pull/13162