summaryrefslogtreecommitdiff
path: root/yjit/src/codegen.rs
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2025-05-08 20:47:51 +0200
committerJean Boussier <[email protected]>2025-05-09 10:22:51 +0200
commitc9b08882b796c9d3a5f92d57d0b4f866fb24f3ac (patch)
tree2012f42eea9fc420e656566be1716feec7fe85b1 /yjit/src/codegen.rs
parente0200cfba03bf7d23b6e298c35ca2636cbbdbd91 (diff)
Refactor `rb_shape_get_next` to return an ID
Also rename it, and change parameters to be consistent with other transition functions.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13283
Diffstat (limited to 'yjit/src/codegen.rs')
-rw-r--r--yjit/src/codegen.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 08e8c68404..cfae1b6c1d 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -3112,8 +3112,8 @@ fn gen_set_ivar(
let mut new_shape_too_complex = false;
let new_shape = if !shape_too_complex && receiver_t_object && ivar_index.is_none() {
let current_shape = comptime_receiver.shape_of();
- let next_shape = unsafe { rb_shape_get_next_no_warnings(current_shape, comptime_receiver, ivar_name) };
- let next_shape_id = unsafe { rb_shape_id(next_shape) };
+ let next_shape_id = unsafe { rb_shape_transition_add_ivar_no_warnings(comptime_receiver, ivar_name) };
+ let next_shape = unsafe { RSHAPE(next_shape_id) };
// If the VM ran out of shapes, or this class generated too many leaf,
// it may be de-optimized into OBJ_TOO_COMPLEX_SHAPE (hash-table).