diff options
author | Jean Boussier <[email protected]> | 2025-06-07 16:48:26 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-06-07 18:30:44 +0200 |
commit | a640723d31262904b4de14be55357fb426873d7f () | |
tree | 3cc1e8b9e2d8d2b2864bba5e1a1eb22589b30145 /shape.h | |
parent | 191f6e3b8744ae459ab7f6cb4d95ac5218856084 (diff) |
Simplify `rb_gc_rebuild_shape`
Now that there no longer multiple shape roots, all we need to do when moving an object from one slot to the other is to update the `heap_index` part of the shape_id. Since this never need to create a shape transition, it will always work and never result in a complex shape.
Notes: Merged: https://.com/ruby/ruby/pull/13556
-rw-r--r-- | shape.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -164,6 +164,7 @@ shape_id_t rb_shape_transition_remove_ivar(VALUE obj, ID id, shape_id_t *removed shape_id_t rb_shape_transition_add_ivar(VALUE obj, ID id); shape_id_t rb_shape_transition_add_ivar_no_warnings(VALUE obj, ID id); shape_id_t rb_shape_transition_object_id(VALUE obj); shape_id_t rb_shape_object_id(shape_id_t original_shape_id); void rb_shape_free_all(void); @@ -302,8 +303,6 @@ RBASIC_FIELDS_COUNT(VALUE obj) return RSHAPE(rb_obj_shape_id(obj))->next_field_index; } -shape_id_t rb_shape_traverse_from_new_root(shape_id_t initial_shape_id, shape_id_t orig_shape_id); - bool rb_obj_set_shape_id(VALUE obj, shape_id_t shape_id); static inline bool |