8000 Merge pull request #110 from Shopify/remove-invalidation · github/ruby@e415972 · GitHub
[go: up one dir, main page]

Skip to content

Commit e415972

Browse files
authored
Merge pull request #110 from Shopify/remove-invalidation
Partial revert of ceebc7f
2 parents 312c95d + 654761f commit e415972

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,7 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, rb_objspace_t *objspace,
29132913
asan_poison_object((VALUE)cc);
29142914
}
29152915
}
2916-
rb_vm_cc_invalidate(cc);
2916+
vm_cc_invalidate(cc);
29172917
}
29182918
ruby_xfree(ccs->entries);
29192919
}

vm_callinfo.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,16 @@ vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missi
410410
*(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason;
411411
}
412412

413-
void rb_vm_cc_invalidate(const struct rb_callcache *cc);
413+
static inline void
414+
vm_cc_invalidate(const struct rb_callcache *cc)
415+
{
416+
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
417+
VM_ASSERT(cc != vm_cc_empty());
418+
VM_ASSERT(cc->klass != 0); // should be enable
419+
420+
*(VALUE *)&cc->klass = 0;
421+
RB_DEBUG_COUNTER_INC(cc_ent_invalidate);
422+
}
414423

415424
/* calldata */
416425

vm_method.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,6 @@ rb_vm_mtbl_dump(const char *msg, VALUE klass, ID target_mid)
115115
vm_mtbl_dump(klass, target_mid);
116116
}
117117

118-
void
119-
rb_vm_cc_invalidate(const struct rb_callcache *cc)
120-
{
121-
VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache));
122-
VM_ASSERT(cc != vm_cc_empty());
123-
VM_ASSERT(cc->klass != 0); // should be enable
124-
125-
*(VALUE *)&cc->klass = 0;
126-
RB_DEBUG_COUNTER_INC(cc_ent_invalidate);
127-
}
128-
129-
130118
static inline void
131119
vm_cme_invalidate(rb_callable_method_entry_t *cme)
132120
{

0 commit comments

Comments
 (0)
0