diff options
author | Jemma Issroff <[email protected]> | 2022-10-21 16:24:29 -0400 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2022-10-21 14:57:34 -0700 |
commit | a11952dac1a5b0776a493968eeffbd4be4403b76 (patch) | |
tree | b905121c4e4ac94010def14957da6539ce0dd2d5 /shape.h | |
parent | 13bd617ea6fdf72467c593639cf33312a06c330c (diff) |
Rename `iv_count` on shapes to `next_iv_index`
`iv_count` is a misleading name because when IVs are unset, the new
shape doesn't decrement this value. `next_iv_count` is an accurate, and
more descriptive name.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6608
Diffstat (limited to 'shape.h')
-rw-r--r-- | shape.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -45,7 +45,7 @@ typedef uint16_t shape_id_t; struct rb_shape { struct rb_id_table * edges; // id_table from ID (ivar) to next shape ID edge_name; // ID (ivar) for transition from parent to rb_shape - attr_index_t iv_count; + attr_index_t next_iv_index; uint8_t type; shape_id_t parent_id; }; @@ -129,7 +129,7 @@ static inline uint32_t ROBJECT_IV_COUNT(VALUE obj) { RBIMPL_ASSERT_TYPE(obj, RUBY_T_OBJECT); - uint32_t ivc = rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->iv_count; + uint32_t ivc = rb_shape_get_shape_by_id(ROBJECT_SHAPE_ID(obj))->next_iv_index; RUBY_ASSERT(ivc <= ROBJECT_NUMIV(obj)); return ivc; } |