summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Bernstein <max.bernstein@shopify.com>2025-02-06 14:10:37 -0500
committerTakashi Kokubun <takashikkbn@gmail.com>2025-04-18 21:52:56 +0900
commit4b9455a859fc54dad4c2ad920f664021b2ae035b (patch)
treede4eecffead280b3a3577836aedfa25344738e64
parent9b54848d66891a4bf1731bb398864f67a797f7b4 (diff)
Add some INT2FIX
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
-rw-r--r--zjit/src/ir.rs8
1 files changed, 7 insertions, 1 deletions
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