From a11952dac1a5b0776a493968eeffbd4be4403b76 Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Fri, 21 Oct 2022 16:24:29 -0400 Subject: 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. --- shape.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shape.h') 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; } -- cgit v1.2.1