From 4b9455a859fc54dad4c2ad920f664021b2ae035b Mon Sep 17 00:00:00 2001 From: Max Bernstein Date: Thu, 6 Feb 2025 14:10:37 -0500 Subject: Add some INT2FIX --- zjit/src/ir.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zjit/src/ir.rs b/zjit/src/ir.rs index 023b1f7a49..1840663552 100644 --- a/zjit/src/ir.rs +++ b/zjit/src/ir.rs @@ -199,6 +199,12 @@ pub fn iseq_to_ssa(iseq: *const rb_iseq_t) { } state.push(Opnd::Insn(insn_id)); } + YARVINSN_putobject_INT2FIX_0_ => { + state.push(Opnd::Const(VALUE::fixnum_from_usize(0))); + } + YARVINSN_putobject_INT2FIX_1_ => { + state.push(Opnd::Const(VALUE::fixnum_from_usize(1))); + } YARVINSN_setlocal_WC_0 => { let val = state.pop(); state.setlocal(0, val); @@ -218,7 +224,7 @@ pub fn iseq_to_ssa(iseq: *const rb_iseq_t) { YARVINSN_leave => { result.push_insn(block, Insn::Return { val: state.pop() }); } - _ => panic!("zjit: unknown opcode `{}'", insn_name(opcode as usize)), + _ => eprintln!("zjit: unknown opcode `{}'", insn_name(opcode as usize)), } // Move to the next instruction to compile -- cgit v1.2.3