@@ -487,7 +487,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
487
487
VALUE val = Qundef ;
488
488
VALUE klass = RBASIC (obj )-> klass ;
489
489
490
- if (LIKELY ((!is_attr && ic -> ic_serial == RCLASS_EXT (klass )-> class_serial ) ||
490
+ if (LIKELY ((!is_attr && ic -> ic_serial == RCLASS_SERIAL (klass )) ||
491
491
(is_attr && ci -> aux .index > 0 ))) {
492
492
long index = !is_attr ? (long )ic -> ic_value .index : ci -> aux .index - 1 ;
493
493
long len = ROBJECT_NUMIV (obj );
@@ -510,7 +510,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr)
510
510
}
511
511
if (!is_attr ) {
512
512
ic -> ic_value .index = index ;
513
- ic -> ic_serial = RCLASS_EXT (klass )-> class_serial ;
513
+ ic -> ic_serial = RCLASS_SERIAL (klass );
514
514
}
515
515
else { /* call_info */
516
516
ci -> aux .index = index + 1 ;
@@ -542,7 +542,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic, rb_call_info_t *ci, int is_attr)
542
542
st_data_t index ;
543
543
544
544
if (LIKELY (
545
- (!is_attr && ic -> ic_serial == RCLASS_EXT (klass )-> class_serial ) ||
545
+ (!is_attr && ic -> ic_serial == RCLASS_SERIAL (klass )) ||
546
546
(is_attr && ci -> aux .index > 0 ))) {
547
547
long index = !is_attr ? (long )ic -> ic_value .index : ci -> aux .index - 1 ;
548
548
long len = ROBJECT_NUMIV (obj );
@@ -559,7 +559,7 @@ vm_setivar(VALUE obj, ID id, VALUE val, IC ic, rb_call_info_t *ci, int is_attr)
559
559
if (iv_index_tbl && st_lookup (iv_index_tbl , (st_data_t )id , & index )) {
560
560
if (!is_attr ) {
561
561
ic -> ic_value .index = index ;
562
- ic -> ic_serial = RCLASS_EXT (klass )-> class_serial ;
562
+ ic -> ic_serial = RCLASS_SERIAL (klass );
563
563
}
564
564
else {
565
565
ci -> aux .index = index + 1 ;
@@ -823,7 +823,7 @@ vm_search_method(rb_call_info_t *ci, VALUE recv)
823
823
VALUE klass = CLASS_OF (recv );
824
824
825
825
#if OPT_INLINE_METHOD_CACHE
826
- if (LIKELY (GET_GLOBAL_METHOD_STATE () == ci -> method_state && RCLASS_EXT (klass )-> class_serial == ci -> class_serial )) {
826
+ if (LIKELY (GET_GLOBAL_METHOD_STATE () == ci -> method_state && RCLASS_SERIAL (klass ) == ci -> class_serial )) {
827
827
/* cache hit! */
828
828
return ;
829
829
}
@@ -834,7 +834,7 @@ vm_search_method(rb_call_info_t *ci, VALUE recv)
834
834
ci -> call = vm_call_general ;
835
835
#if OPT_INLINE_METHOD_CACHE
836
836
ci -> method_state = GET_GLOBAL_METHOD_STATE ();
837
- ci -> class_serial = RCLASS_EXT (klass )-> class_serial ;
837
+ ci -> class_serial = RCLASS_SERIAL (klass );
838
838
#endif
839
839
}
840
840
0 commit comments