summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-03-25 06:58:50 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-03-25 06:58:50 +0000
commit8dd0fb9039bbe6152ea5542e6bc70de152871e23 (patch)
tree3a8c658692e6692095195b081687cf92055a74e9 /vm_insnhelper.c
parent9f05891c3daa79e26dd01f0575f1b595ddb7d302 (diff)
use cfp->bp more.
cfp->bp was (re-)introduced by Kokubun san, but VM doesn't use it because I (ko1) want to remove it in a future. But using it make leave instruction fast because of sp consisntency check. So now VM uses cfp->bp. To use cfp->bp, I checked the value and I found that it is not a "initial value of sp" but a "initial value of ep". Fix this problem and fix all bp references (this is why bp is renamed to bp_). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0e845dea60..af1ede2e6b 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -299,8 +299,8 @@ vm_push_frame(rb_execution_context_t *ec,
*sp = type; /* ep[-0] / ENV_FLAGS */
/* Store initial value of ep as bp to skip calculation cost of bp on JIT cancellation. */
- cfp->ep = cfp->bp = sp;
- cfp->sp = sp + 1;
+ cfp->ep = sp;
+ cfp->bp_ = cfp->sp = sp + 1;
#if VM_DEBUG_BP_CHECK
cfp->bp_check = sp + 1;
@@ -1640,6 +1640,7 @@ double_cmp_ge(double a, double b)
static VALUE *
vm_base_ptr(const rb_control_frame_t *cfp)
{
+#if 0
const rb_control_frame_t *prev_cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
if (cfp->iseq && VM_FRAME_RUBYFRAME_P(cfp)) {
@@ -1661,6 +1662,9 @@ vm_base_ptr(const rb_control_frame_t *cfp)
else {
return NULL;
}
+#else
+ return cfp->bp_;
+#endif
}
/* method call processes with call_info */