| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
* ZJIT: Add NoSingletonClass patch point
This patch point makes sure that when the object has a singleton class,
the JIT code is invalidated. As of now, this is only needed for C call
optimization.
In YJIT, the singleton class guard only applies to Array, Hash, and String.
But in ZJIT, we may optimize C calls from gems (e.g. `sqlite3`). So the
patch point needs to be applied to a broader range of classes.
* ZJIT: Only generate NoSingletonClass guard when the type can have singleton class
* ZJIT: Update or forget NoSingletonClass patch point when needed
|
|
Add side exit tracing functionality for ZJIT
|
|
No point taking the panic risks with RefCell when most fields in it are
already in a Cell. Put `iseq` in a Cell and we no longer need the
wrapping. Saves memory, too.
|
|
|
|
|
|
Without this, we crash during reference update.
|
|
* ZJIT: Incorporate bb0-prologue and PC check into HIR
* Fix an outdated comment
* Use shallow clone for LoadPC and EntryPoint
* Reproduce the actual HIR graph to pass validation
* Fill out param types for jit_entry_block
* Add Type::from_cptr
* Add a TODO comment about Const::CPtr printing
|
|
|
|
|
|
|
|
* ZJIT: Handle ISEQ moves in IseqCall
* ZJIT: Handle ISEQ moves in Invariants
* Let gen_iseq_call take a reference
* Avoid unneeded iter()
|
|
|
|
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
ZJIT: Remove GC offsts overwritten by invalidation
|
|
This issues writebarriers for objects added via gc_offsets or by
profiling. This may be slower than writebarrier_remember, but we would
like it to be more debuggable.
Co-authored-by: Max Bernstein <ruby@bernsteinbear.com>
Co-authored-by: Stan Lo <stan001212@gmail.com>
|
|
|
|
This is notably faster: no need to hash indices.
Before:
```
plum% samply record ~/.rubies/ruby-zjit/bin/ruby --zjit benchmarks/getivar.rb
ruby 3.5.0dev (2025-07-10T14:40:49Z master 51252ef8d7) +ZJIT dev +PRISM [arm64-darwin24]
itr: time
#1: 5311ms
#2: 49ms
#3: 49ms
#4: 48ms
```
After:
```
plum% samply record ~/.rubies/ruby-zjit/bin/ruby --zjit benchmarks/getivar.rb
ruby 3.5.0dev (2025-07-10T15:09:06Z mb-benchmark-compile 42ffd3c1ee) +ZJIT dev +PRISM [arm64-darwin24]
itr: time
#1: 1332ms
#2: 49ms
#3: 48ms
#4: 48ms
```
|
|
|