diff options
Diffstat (limited to 'yjit/src')
-rw-r--r-- | yjit/src/codegen.rs | 5 | ||||
-rw-r--r-- | yjit/src/cruby_bindings.inc.rs | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index e4fa1a3665..5dff45ba8d 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -2403,7 +2403,6 @@ fn gen_setinstancevariable( let shape = comptime_receiver.shape_of(); let current_capacity = unsafe { (*shape).capacity }; - let new_capacity = current_capacity * 2; // If the object doesn't have the capacity to store the IV, // then we'll need to allocate it. @@ -2416,7 +2415,7 @@ fn gen_setinstancevariable( // We need to add an extended table to the object // First, create an outgoing transition that increases the // capacity - Some(unsafe { rb_shape_transition_shape_capa(shape, new_capacity) }) + Some(unsafe { rb_shape_transition_shape_capa(shape) }) } else { None }; @@ -2429,7 +2428,7 @@ fn gen_setinstancevariable( let new_shape_id = unsafe { rb_shape_id(dest_shape) }; let needs_extension = if needs_extension { - Some((current_capacity, new_capacity)) + Some((current_capacity, unsafe { (*dest_shape).capacity })) } else { None }; diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs index bf554a9f85..fde68a80b5 100644 --- a/yjit/src/cruby_bindings.inc.rs +++ b/yjit/src/cruby_bindings.inc.rs @@ -1179,10 +1179,7 @@ extern "C" { pub fn rb_shape_get_shape_id(obj: VALUE) -> shape_id_t; pub fn rb_shape_get_iv_index(shape: *mut rb_shape_t, id: ID, value: *mut attr_index_t) -> bool; pub fn rb_shape_obj_too_complex(obj: VALUE) -> bool; - pub fn rb_shape_transition_shape_capa( - shape: *mut rb_shape_t, - new_capacity: u32, - ) -> *mut rb_shape_t; + pub fn rb_shape_transition_shape_capa(shape: *mut rb_shape_t) -> *mut rb_shape_t; pub fn rb_shape_get_next(shape: *mut rb_shape_t, obj: VALUE, id: ID) -> *mut rb_shape_t; pub fn rb_shape_id(shape: *mut rb_shape_t) -> shape_id_t; pub fn rb_gvar_get(arg1: ID) -> VALUE; |