summaryrefslogtreecommitdiff
path: root/shape.h
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2023-10-25 16:52:37 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2023-11-20 16:09:48 -0800
commit6fce8c79807e69cfe475b5291e892567c869fbcc (patch)
tree42419f2e00fea8e2d05674873dcbfccb511b83f4 /shape.h
parent7164715666cfbffd5540ee374eee2a5568342d2d (diff)
Don't try compacting ivars on Classes that are "too complex"
Too complex classes use a hash table to store ivs, and should always pin their IVs. We shouldn't touch those classes in compaction.
Diffstat (limited to 'shape.h')
-rw-r--r--shape.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/shape.h b/shape.h
index 5b8420a402..a222a75ad8 100644
--- a/shape.h
+++ b/shape.h
@@ -213,14 +213,6 @@ RBASIC_IV_COUNT(VALUE obj)
return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
}
-static inline uint32_t
-RCLASS_IV_COUNT(VALUE obj)
-{
- RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
- uint32_t ivc = rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
- return ivc;
-}
-
rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);