@@ -3078,17 +3078,6 @@ impl Function {
30783078 }
30793079 }
30803080
3081- fn is_metaclass ( & self , object : VALUE ) -> bool {
3082- unsafe {
3083- if RB_TYPE_P ( object, RUBY_T_CLASS ) && rb_zjit_singleton_class_p ( object) {
3084- let attached = rb_class_attached_object ( object) ;
3085- RB_TYPE_P ( attached, RUBY_T_CLASS ) || RB_TYPE_P ( attached, RUBY_T_MODULE )
3086- } else {
3087- false
3088- }
3089- }
3090- }
3091-
30923081 pub fn load_rbasic_flags ( & mut self , block : BlockId , recv : InsnId ) -> InsnId {
30933082 self . push_insn ( block, Insn :: LoadField { recv, id : ID ! ( _rbasic_flags) , offset : RUBY_OFFSET_RBASIC_FLAGS , return_type : types:: CUInt64 } )
30943083 }
@@ -3308,7 +3297,7 @@ impl Function {
33083297 } else if !has_block && def_type == VM_METHOD_TYPE_IVAR && args. is_empty ( ) {
33093298 // Check if we're accessing ivars of a Class or Module object as they require single-ractor mode.
33103299 // We omit gen_prepare_non_leaf_call on gen_getivar, so it's unsafe to raise for multi-ractor mode.
3311- if self . is_metaclass ( klass ) && !self . assume_single_ractor_mode ( block, state) {
3300+ if klass . is_metaclass ( ) && !self . assume_single_ractor_mode ( block, state) {
33123301 self . push_insn_id ( block, insn_id) ; continue ;
33133302 }
33143303 // Check singleton class assumption first, before emitting other patchpoints
@@ -3328,7 +3317,7 @@ impl Function {
33283317 } else if let ( false , VM_METHOD_TYPE_ATTRSET , & [ val] ) = ( has_block, def_type, args. as_slice ( ) ) {
33293318 // Check if we're accessing ivars of a Class or Module object as they require single-ractor mode.
33303319 // We omit gen_prepare_non_leaf_call on gen_getivar, so it's unsafe to raise for multi-ractor mode.
3331- if self . is_metaclass ( klass ) && !self . assume_single_ractor_mode ( block, state) {
3320+ if klass . is_metaclass ( ) && !self . assume_single_ractor_mode ( block, state) {
33323321 self . push_insn_id ( block, insn_id) ; continue ;
33333322 }
33343323
0 commit comments