@Override public void BoxFixnumInstr(BoxFixnumInstr instr) { IRBytecodeAdapter m = jvmMethod(); SkinnyMethodAdapter a = m.adapter; // Load runtime m.loadContext(); a.getfield(p(ThreadContext.class), "runtime", ci(Ruby.class)); // Get unboxed fixnum loadFixnumArg(instr.getValue()); // Box the fixnum a.invokevirtual(p(Ruby.class), "newFixnum", sig(RubyFixnum.class, long.class)); // Store it jvmStoreLocal(instr.getResult()); }
@Override public void BoxFixnumInstr(BoxFixnumInstr instr) { IRBytecodeAdapter m = jvmMethod(); SkinnyMethodAdapter a = m.adapter; // Load runtime m.loadContext(); a.getfield(p(ThreadContext.class), "runtime", ci(Ruby.class)); // Get unboxed fixnum loadFixnumArg(instr.getValue()); // Box the fixnum a.invokevirtual(p(Ruby.class), "newFixnum", sig(RubyFixnum.class, long.class)); // Store it jvmStoreLocal(instr.getResult()); }