diff options
author | Aaron Patterson <[email protected]> | 2023-10-25 16:52:37 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2023-11-20 16:09:48 -0800 |
commit | 6fce8c79807e69cfe475b5291e892567c869fbcc (patch) | |
tree | 42419f2e00fea8e2d05674873dcbfccb511b83f4 /variable.c | |
parent | 7164715666cfbffd5540ee374eee2a5568342d2d (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 'variable.c')
-rw-r--r-- | variable.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/variable.c b/variable.c index 511d5c7d54..b6c9cc3e0d 100644 --- a/variable.c +++ b/variable.c @@ -63,22 +63,6 @@ static void setup_const_entry(rb_const_entry_t *, VALUE, VALUE, rb_const_flag_t) static VALUE rb_const_search(VALUE klass, ID id, int exclude, int recurse, int visibility); static st_table *generic_iv_tbl_; -static inline st_table * -RCLASS_IV_HASH(VALUE obj) -{ - RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE)); - RUBY_ASSERT(rb_shape_obj_too_complex(obj)); - return (st_table *)RCLASS_IVPTR(obj); -} - -static inline void -RCLASS_SET_IV_HASH(VALUE obj, const st_table *tbl) -{ - RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE)); - RUBY_ASSERT(rb_shape_obj_too_complex(obj)); - RCLASS_IVPTR(obj) = (VALUE *)tbl; -} - void Init_var_tables(void) { |