diff options
author | Jemma Issroff <[email protected]> | 2022-10-21 12:58:51 -0400 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2022-10-21 14:56:48 -0700 |
commit | 13bd617ea6fdf72467c593639cf33312a06c330c (patch) | |
tree | 9da47089160cfa85d6723256b1e952dcc0843a52 /class.c | |
parent | 87bb0bee6b9843ea32ca6bb48f9e03b1876b7c48 (diff) |
Remove unused class serial
Before object shapes, we were using class serial to invalidate
inline caches. Now that we use shape_id for inline cache keys,
the class serial is unnecessary.
Co-Authored-By: Aaron Patterson <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6605
Diffstat (limited to 'class.c')
-rw-r--r-- | class.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -208,9 +208,6 @@ class_alloc(VALUE flags, VALUE klass) #if USE_RVARGC memset(RCLASS_EXT(obj), 0, sizeof(rb_classext_t)); -# if SIZEOF_SERIAL_T != SIZEOF_VALUE - RCLASS(obj)->class_serial_ptr = ZALLOC(rb_serial_t); -# endif #else obj->ptr = ZALLOC(rb_classext_t); #endif @@ -226,7 +223,6 @@ class_alloc(VALUE flags, VALUE klass) RCLASS_MODULE_SUBCLASSES(obj) = NULL; */ RCLASS_SET_ORIGIN((VALUE)obj, (VALUE)obj); - RCLASS_SERIAL(obj) = rb_next_class_serial(); RB_OBJ_WRITE(obj, &RCLASS_REFINED_CLASS(obj), Qnil); RCLASS_ALLOCATOR(obj) = 0; @@ -2143,9 +2139,7 @@ singleton_class_of(VALUE obj) klass = METACLASS_OF(obj); if (!(FL_TEST(klass, FL_SINGLETON) && rb_attr_get(klass, id_attached) == obj)) { - rb_serial_t serial = RCLASS_SERIAL(klass); klass = rb_make_metaclass(obj, klass); - RCLASS_SERIAL(klass) = serial; } RB_FL_SET_RAW(klass, RB_OBJ_FROZEN_RAW(obj)); |