summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-02-26 00:34:01 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-02-26 00:34:02 -0800
commit33b78b89ac1901fe9000d03bcb3cdf79193a75a1 (patch)
treee207cdc5cf57e95361aa01d7e96e857d0a625ee7 /iseq.c
parent69f377a3d62b29bc927da7fdae99bcb5e7d096fe (diff)
Eliminate unnecessary mjit_iseq_cc_entries calls
just in case.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 065791b74b..0697fef53b 100644
--- a/iseq.c
+++ b/iseq.c
@@ -359,9 +359,10 @@ rb_iseq_mark(const rb_iseq_t *iseq)
}
#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++) {
- const struct rb_callcache *cc = mjit_iseq_cc_entries(body)[i];
+ const struct rb_callcache *cc = cc_entries[i];
if (cc != NULL) {
rb_gc_mark((VALUE)cc); // pindown
}