@@ -248,26 +248,26 @@ clear_method_cache_by_id_in_class(VALUE klass, ID mid)
248
248
RB_VM_LOCKING () { if (LIKELY (RCLASS_SUBCLASSES_FIRST (klass ) == NULL )) {
249
249
// no subclasses
250
250
// check only current class
251
-
251
+
252
252
// invalidate CCs
253
253
struct rb_id_table * cc_tbl = RCLASS_WRITABLE_CC_TBL (klass );
254
254
invalidate_method_cache_in_cc_table (cc_tbl , mid );
255
255
if (RCLASS_CC_TBL_NOT_PRIME_P (klass , cc_tbl )) {
256
256
invalidate_method_cache_in_cc_table (RCLASS_PRIME_CC_TBL (klass ), mid );
257
257
}
258
-
258
+
259
259
// remove from callable_m_tbl, if exists
260
260
struct rb_id_table * cm_tbl = RCLASS_WRITABLE_CALLABLE_M_TBL (klass );
261
261
invalidate_callable_method_entry_in_callable_m_table (cm_tbl , mid );
262
262
if (RCLASS_CALLABLE_M_TBL_NOT_PRIME_P (klass , cm_tbl )) {
263
263
invalidate_callable_method_entry_in_callable_m_table (RCLASS_PRIME_CALLABLE_M_TBL (klass ), mid );
264
264
}
265
-
265
+
266
266
RB_DEBUG_COUNTER_INC (cc_invalidate_leaf );
267
267
}
268
268
else {
269
269
const rb_callable_method_entry_t * cme = complemented_callable_method_entry (klass , mid );
270
-
270
+
271
271
if (cme ) {
272
272
// invalidate cme if found to invalidate the inline method cache.
273
273
if (METHOD_ENTRY_CACHED (cme )) {
@@ -285,29 +285,29 @@ clear_method_cache_by_id_in_class(VALUE klass, ID mid)
285
285
else {
286
286
klass_housing_cme = RCLASS_ORIGIN (owner );
287
287
}
288
-
288
+
289
289
// replace the cme that will be invalid in the all classexts
290
290
invalidate_callable_method_entry_in_every_m_table (klass_housing_cme , mid , cme );
291
291
}
292
-
292
+
293
293
vm_cme_invalidate ((rb_callable_method_entry_t * )cme );
294
294
RB_DEBUG_COUNTER_INC (cc_invalidate_tree_cme );
295
-
295
+
296
296
// In case of refinement ME, also invalidate the wrapped ME that
297
297
// could be cached at some callsite and is unreachable from any
298
298
// RCLASS_WRITABLE_CC_TBL.
299
299
if (cme -> def -> type == VM_METHOD_TYPE_REFINED && cme -> def -> body .refined .orig_me ) {
300
300
vm_cme_invalidate ((rb_callable_method_entry_t * )cme -> def -> body .refined .orig_me );
301
301
}
302
-
302
+
303
303
if (cme -> def -> iseq_overload ) {
304
304
rb_callable_method_entry_t * monly_cme = (rb_callable_method_entry_t * )lookup_overloaded_cme (cme );
305
305
if (monly_cme ) {
306
306
vm_cme_invalidate (monly_cme );
307
307
}
308
308
}
309
309
}
310
-
310
+
311
311
// invalidate complement tbl
312
312
if (METHOD_ENTRY_COMPLEMENTED (cme )) {
313
313
VALUE defined_class = cme -> defined_class ;
@@ -318,14 +318,14 @@ clear_method_cache_by_id_in_class(VALUE klass, ID mid)
318
318
invalidate_complemented_method_entry_in_callable_m_table (prime_cm_table , mid );
319
319
}
320
320
}
321
-
321
+
322
322
RB_DEBUG_COUNTER_INC (cc_invalidate_tree );
323
323
}
324
324
else {
325
325
invalidate_negative_cache (mid );
326
326
}
327
327
}
328
-
328
+
329
329
rb_gccct_clear_table (Qnil );
330
330
}
331
331
}
0 commit comments