summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-10-21 16:24:29 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2022-10-21 14:57:34 -0700
commita11952dac1a5b0776a493968eeffbd4be4403b76 (patch)
treeb905121c4e4ac94010def14957da6539ce0dd2d5 /shape.h
parent13bd617ea6fdf72467c593639cf33312a06c330c (diff)
downloadruby-a11952dac1a5b0776a493968eeffbd4be4403b76.tar.gz
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.
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/shape.h b/shape.h
index e978bac121..1470cdd4aa 100644
--- a/shape.h
+++ b/shape.h
@@ -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;
}