diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-13 07:12:07 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-13 07:12:07 +0000 |
commit | 26a11ae77107884ba53592d239a75c2028e244a0 (patch) | |
tree | 651dda8a296f997f831205a5f8802055d5d6d46a /vm_insnhelper.h | |
parent | 8bc5c172f90b4ff1c5975f1345b0e3f6e2f47ccf (diff) |
Revert "vm_insnhelper.h: simplify EXEC_EC_CFP implementation"
This reverts commit r64711, because EXEC_EC_CFP on JIT-ed code does not
call jit_func with the patch when catch_except_p is true. It wasn't intentional.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r-- | vm_insnhelper.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h index f63ada001d..b5f35df2bd 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -144,7 +144,11 @@ enum vm_regan_acttype { the caller frame may have stack values in the local variables and the cancelling the caller frame will purge them. But directly calling mjit_exec is faster... */ #define EXEC_EC_CFP(val) do { \ - if ((val = mjit_exec(ec, TRUE)) == Qundef) { \ + if (ec->cfp->iseq->body->catch_except_p) { \ + VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); \ + val = vm_exec(ec, TRUE); \ + } \ + else if ((val = mjit_exec(ec)) == Qundef) { \ VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH); \ val = vm_exec(ec, FALSE); \ } \ @@ -153,7 +157,7 @@ enum vm_regan_acttype { /* When calling from VM, longjmp in the callee won't purge any JIT-ed caller frames. So it's safe to directly call mjit_exec. */ #define EXEC_EC_CFP(val) do { \ - if ((val = mjit_exec(ec, FALSE)) == Qundef) { \ + if ((val = mjit_exec(ec)) == Qundef) { \ RESTORE_REGS(); \ NEXT_INSN(); \ } \ |