diff options
author | Jean Boussier <[email protected]> | 2025-05-08 18:36:01 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-05-09 10:22:51 +0200 |
commit | 9966de11fb349688f12ea16dc4c082269a8fdb42 () | |
tree | a10e5679439dc108952b52fd79e89d6327112531 /shape.c | |
parent | df7d25bb3e8105783f3a243f12213d5c52c42377 (diff) |
Refactor `rb_shape_get_next_iv_shape` to take and return ids.
Notes: Merged: https://.com/ruby/ruby/pull/13283
-rw-r--r-- | shape.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -789,14 +789,22 @@ rb_shape_object_id_shape(VALUE obj) * This function is used for assertions where we don't want to increment * max_iv_count */ -rb_shape_t * -rb_shape_get_next_iv_shape(rb_shape_t *shape, ID id) { RUBY_ASSERT(!is_instance_id(id) || RTEST(rb_sym2str(ID2SYM(id)))); bool dont_care; return get_next_shape_internal(shape, id, SHAPE_IVAR, &dont_care, true); } static inline rb_shape_t * shape_get_next(rb_shape_t *shape, VALUE obj, ID id, bool emit_warnings) { @@ -1087,7 +1095,7 @@ rb_shape_rebuild_shape(rb_shape_t *initial_shape, rb_shape_t *dest_shape) switch ((enum shape_type)dest_shape->type) { case SHAPE_IVAR: - midway_shape = rb_shape_get_next_iv_shape(midway_shape, dest_shape->edge_name); break; case SHAPE_OBJ_ID: case SHAPE_ROOT: |