summaryrefslogtreecommitdiff
path: root/yjit/src/codegen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'yjit/src/codegen.rs')
-rw-r--r--yjit/src/codegen.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 5f7d61f8b3..3e08857295 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -3128,8 +3128,6 @@ fn gen_set_ivar(
if new_shape_too_complex {
Some((next_shape_id, None, 0_usize))
} else {
- let current_shape = unsafe { rb_shape_lookup(current_shape_id) };
-
let current_capacity = unsafe { rb_yjit_shape_capacity(current_shape_id) };
let next_capacity = unsafe { rb_yjit_shape_capacity(next_shape_id) };
@@ -3138,7 +3136,7 @@ fn gen_set_ivar(
let needs_extension = next_capacity != current_capacity;
// We can write to the object, but we need to transition the shape
- let ivar_index = unsafe { (*current_shape).next_field_index } as usize;
+ let ivar_index = unsafe { rb_yjit_shape_index(next_shape_id) } as usize;
let needs_extension = if needs_extension {
Some((current_capacity, next_capacity))
@@ -6277,16 +6275,12 @@ fn jit_rb_str_dup(
jit_prepare_call_with_gc(jit, asm);
- // Check !FL_ANY_RAW(str, FL_EXIVAR), which is part of BARE_STRING_P.
let recv_opnd = asm.stack_pop(1);
let recv_opnd = asm.load(recv_opnd);
- let flags_opnd = Opnd::mem(64, recv_opnd, RUBY_OFFSET_RBASIC_FLAGS);
- asm.test(flags_opnd, Opnd::Imm(RUBY_FL_EXIVAR as i64));
- asm.jnz(Target::side_exit(Counter::send_str_dup_exivar));
// Call rb_str_dup
let stack_ret = asm.stack_push(Type::CString);
- let ret_opnd = asm.ccall(rb_str_dup as *const u8, vec![recv_opnd]);
+ let ret_opnd = asm.ccall(rb_str_dup_m as *const u8, vec![recv_opnd]);
asm.mov(stack_ret, ret_opnd);
true