diff options
| author | nozomemein <b8yukifsukeo999n@gmail.com> | 2026-01-09 09:56:11 +0900 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2026-01-15 09:00:53 -0800 |
| commit | 065db7cf61cfb69d869f4b403b49b1efc314eead (patch) | |
| tree | 0194a4b4e1375b6bd7076b58944441b376d852f5 /zjit/src/codegen.rs | |
| parent | 11edc286d837f66b37433e7d51c8b8f500e1be84 (diff) | |
ZJIT: Rename ArrayArefFixnum -> ArrayAref
Diffstat (limited to 'zjit/src/codegen.rs')
| -rw-r--r-- | zjit/src/codegen.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 16ac2573f2..25cccd1bd1 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -374,7 +374,7 @@ fn gen_insn(cb: &mut CodeBlock, jit: &mut JITState, asm: &mut Assembler, functio Insn::NewRange { low, high, flag, state } => gen_new_range(jit, asm, opnd!(low), opnd!(high), *flag, &function.frame_state(*state)), Insn::NewRangeFixnum { low, high, flag, state } => gen_new_range_fixnum(asm, opnd!(low), opnd!(high), *flag, &function.frame_state(*state)), Insn::ArrayDup { val, state } => gen_array_dup(asm, opnd!(val), &function.frame_state(*state)), - Insn::ArrayArefFixnum { array, index, .. } => gen_aref_fixnum(asm, opnd!(array), opnd!(index)), + Insn::ArrayAref { array, index, .. } => gen_array_aref(asm, opnd!(array), opnd!(index)), Insn::ArrayAset { array, index, val } => { no_output!(gen_array_aset(asm, opnd!(array), opnd!(index), opnd!(val))) } @@ -1560,13 +1560,12 @@ fn gen_new_array( } /// Compile array access (`array[index]`) -fn gen_aref_fixnum( +fn gen_array_aref( asm: &mut Assembler, array: Opnd, index: Opnd, ) -> lir::Opnd { - let unboxed_idx = asm.rshift(index, Opnd::UImm(1)); - asm_ccall!(asm, rb_ary_entry, array, unboxed_idx) + asm_ccall!(asm, rb_ary_entry, array, index) } fn gen_array_aset( |
