[前][次][番号順一覧][スレッド一覧]

ruby-changes:60203

From: Takashi <ko1@a...>
Date: Wed, 26 Feb 2020 17:34:24 +0900 (JST)
Subject: [ruby-changes:60203] 33b78b89ac (master): Eliminate unnecessary mjit_iseq_cc_entries calls

https://git.ruby-lang.org/ruby.git/commit/?id=33b78b89ac

From 33b78b89ac1901fe9000d03bcb3cdf79193a75a1 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Wed, 26 Feb 2020 00:34:01 -0800
Subject: Eliminate unnecessary mjit_iseq_cc_entries calls

just in case.

diff --git a/iseq.c b/iseq.c
index 065791b..0697fef 100644
--- a/iseq.c
+++ b/iseq.c
@@ -359,9 +359,10 @@ rb_iseq_mark(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L359
 	}
 
 #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
                 }
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]