diff options
| author | Stan Lo <stan.lo@shopify.com> | 2025-09-22 22:25:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-22 14:25:01 -0700 |
| commit | 93c728ce9143b2f32e5d3073c8d2c87da8e0db54 (patch) | |
| tree | bf6753ddcef08238bfd658679d4e70707f1d8139 | |
| parent | cbfe403315c4eab4f37906137b99c195204d63fe (diff) | |
YJIT: Pass iseq pointer to get/set classvariable functions (#14625)
* YJIT: Pass iseq pointer to get/set classvariable functions
Since we already have the iseq pointer, we can actually save one
memory read by passing it directly.
We need to wrap the iseq in a VALUE so it can be marked correctly
by GC.
* YJIT: Fix missing GC marking when passing iseq to rb_vm_setinstancevariable
Without wrapping the iseq in a `Operand::Value`, the iseq would not be
marked correctly by GC and when compacting the heap, the iseq would be
lost and cause a crash.
| -rw-r--r-- | yjit/src/codegen.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 85fed25d24..67841d2fdc 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -3148,7 +3148,7 @@ fn gen_set_ivar( asm.ccall( rb_vm_setinstancevariable as *const u8, vec