1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Eliminate unnecessary mjit_iseq_cc_entries calls

just in case.
This commit is contained in:
Takashi Kokubun 2020-02-26 00:34:01 -08:00
parent 69f377a3d6
commit 33b78b89ac
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

5
iseq.c
View file

@ -359,9 +359,10 @@ rb_iseq_mark(const rb_iseq_t *iseq)
} }
#if USE_MJIT #if USE_MJIT
if (body->jit_unit && mjit_iseq_cc_entries(body) != NULL) { const struct rb_callcache **cc_entries;
if (body->jit_unit && (cc_entries = mjit_iseq_cc_entries(body)) != NULL) {
for (unsigned int i=0; i<body->ci_size; i++) { for (unsigned int i=0; i<body->ci_size; i++) {
const struct rb_callcache *cc = mjit_iseq_cc_entries(body)[i]; const struct rb_callcache *cc = cc_entries[i];
if (cc != NULL) { if (cc != NULL) {
rb_gc_mark((VALUE)cc); // pindown rb_gc_mark((VALUE)cc); // pindown
} }