diff options
author | Jean Boussier <[email protected]> | 2025-05-08 20:47:51 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-09 10:22:51 +0200 |
commit | c9b08882b796c9d3a5f92d57d0b4f866fb24f3ac () | |
tree | 2012f42eea9fc420e656566be1716feec7fe85b1 /yjit | |
parent | e0200cfba03bf7d23b6e298c35ca2636cbbdbd91 (diff) |
Refactor `rb_shape_get_next` to return an ID
Also rename it, and change parameters to be consistent with other transition functions.
Notes: Merged: https://.com/ruby/ruby/pull/13283
-rw-r--r-- | yjit/bindgen/src/main.rs | 2 | ||||
-rw-r--r-- | yjit/src/codegen.rs | 4 | ||||
-rw-r--r-- | yjit/src/cruby_bindings.inc.rs | 6 |
3 files changed, 4 insertions, 8 deletions
@@ -98,7 +98,7 @@ fn main() { .allowlist_function("RSHAPE") .allowlist_function("rb_shape_id_offset") .allowlist_function("rb_shape_get_iv_index") - .allowlist_function("rb_shape_get_next_no_warnings") .allowlist_function("rb_shape_id") .allowlist_function("rb_shape_obj_too_complex_p") .allowlist_function("rb_shape_too_complex_p") @@ -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) }; // 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). @@ -1093,11 +1093,7 @@ extern "C" { 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_p(obj: VALUE) -> bool; pub fn rb_shape_too_complex_p(shape: *mut rb_shape_t) -> bool; - pub fn rb_shape_get_next_no_warnings( - 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; pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE; |