aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.h
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-13 06:39:40 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-13 06:39:40 +0000
commit1f1e98043d599760ccbf4a3f1d0c81bda5c33f3f (patch)
treeecf80a8fb92b102d314a0a7eb002de3de1774eda /mjit.h
parentd693af5ee5e8c96ad90ddf612d656eb31f2951f9 (diff)
downloadruby-1f1e98043d599760ccbf4a3f1d0c81bda5c33f3f.tar.gz
vm_insnhelper.h: simplify EXEC_EC_CFP implementation
and possibly memory access for iseq->body may be reduced. No significant impact for performance on Optcarrot. * before fps: 55.03865935187656 fps: 57.16854675983188 fps: 57.672458407661765 fps: 58.28989837869383 fps: 58.80503815099268 fps: 59.068054176528534 fps: 59.55736806358244 fps: 61.01018920533034 fps: 63.34167049232186 fps: 65.20575018321766 fps: 65.46758316561318 * after fps: 55.21860411005677 fps: 55.34840351179166 fps: 58.23666596747484 fps: 59.71987124578901 fps: 61.131485120234935 fps: 61.279905164649485 fps: 61.66060774175459 fps: 64.11215576508765 fps: 64.63699742853154 fps: 65.28260058920769 fps: 65.85447796482678 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/mjit.h b/mjit.h
index eee3a8badb..17148fcdc6 100644
--- a/mjit.h
+++ b/mjit.h
@@ -89,7 +89,7 @@ mjit_target_iseq_p(struct rb_iseq_constant_body *body)
/* Try to execute the current iseq in ec. Use JIT code if it is ready.
If it is not, add ISEQ to the compilation queue and return Qundef. */
static inline VALUE
-mjit_exec(rb_execution_context_t *ec)
+mjit_exec(rb_execution_context_t *ec, int guard_except_p)
{
const rb_iseq_t *iseq;
struct rb_iseq_constant_body *body;
@@ -102,6 +102,8 @@ mjit_exec(rb_execution_context_t *ec)
iseq = ec->cfp->iseq;
body = iseq->body;
total_calls = ++body->total_calls;
+ if (guard_except_p && body->catch_except_p)
+ return Qundef;
func = body->jit_func;
if (UNLIKELY((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC)) {