summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorJemma Issroff <[email protected]>2022-10-21 16:24:29 -0400
committerAaron Patterson <[email protected]>2022-10-21 14:57:34 -0700
commita11952dac1a5b0776a493968eeffbd4be4403b76 ()
treeb905121c4e4ac94010def14957da6539ce0dd2d5 /shape.h
parent13bd617ea6fdf72467c593639cf33312a06c330c (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: Merged: https://.com/ruby/ruby/pull/6608
-rw-r--r--shape.h4
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;
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;
RUBY_ASSERT(ivc <= ROBJECT_NUMIV(obj));
return ivc;
}