File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -537,22 +537,19 @@ rb_free_const_table(struct rb_id_table *tbl)
537537
538538// alive: if false, target pointers can be freed already.
539539static void
540- vm_ccs_free (struct rb_class_cc_entries * ccs , int alive , VALUE klass )
540+ vm_ccs_free (struct rb_class_cc_entries * ccs )
541541{
542542 if (ccs -> entries ) {
543543 for (int i = 0 ; i < ccs -> len ; i ++ ) {
544544 const struct rb_callcache * cc = ccs -> entries [i ].cc ;
545- if (!alive ) {
546- // ccs can be free'ed.
547- if (rb_gc_pointer_to_heap_p ((VALUE )cc ) &&
548- !rb_objspace_garbage_object_p ((VALUE )cc ) &&
549- IMEMO_TYPE_P (cc , imemo_callcache ) &&
550- cc -> klass == klass ) {
551- // OK. maybe target cc.
552- }
553- else {
554- continue ;
555- }
545+ if (rb_gc_pointer_to_heap_p ((VALUE )cc ) &&
546+ !rb_objspace_garbage_object_p ((VALUE )cc ) &&
547+ IMEMO_TYPE_P (cc , imemo_callcache )) {
548+ // OK. maybe target cc.
549+ }
550+ else {
551+ /* rb_bug("Freeing garbage cc"); */
552+ continue ;
556553 }
557554
558555 VM_ASSERT (!vm_cc_super_p (cc ) && !vm_cc_refinement_p (cc ));
567564rb_vm_ccs_free (struct rb_class_cc_entries * ccs )
568565{
569566 RB_DEBUG_COUNTER_INC (ccs_free );
570- vm_ccs_free (ccs , true, Qundef );
567+ vm_ccs_free (ccs );
571568}
572569
573570static inline void
You can’t perform that action at this time.
0 commit comments