mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor rb_shape_get_next
to return an ID
Also rename it, and change parameters to be consistent with other transition functions.
This commit is contained in:
parent
e0200cfba0
commit
c9b08882b7
Notes:
git
2025-05-09 08:23:08 +00:00
8 changed files with 17 additions and 23 deletions
|
@ -1639,7 +1639,8 @@ general_ivar_set(VALUE obj, ID id, VALUE val, void *data,
|
|||
rb_raise(rb_eArgError, "too many instance variables");
|
||||
}
|
||||
|
||||
rb_shape_t *next_shape = rb_shape_get_next(current_shape, obj, id);
|
||||
shape_id_t next_shape_id = rb_shape_transition_add_ivar(obj, id);
|
||||
rb_shape_t *next_shape = RSHAPE(next_shape_id);
|
||||
if (UNLIKELY(rb_shape_too_complex_p(next_shape))) {
|
||||
transition_too_complex_func(obj, data);
|
||||
goto too_complex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue