summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-17 16:20:15 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-17 16:20:15 (GMT)
commit80dac806cc84bb1eab7e3752d9dff3d152281861 (patch)
tree2755dc100485c7de06b6cec73c4f6c6aacc6c9c1 /vm_insnhelper.c
parent5aa52587e86b9e2b03cad8b78307e53b777f1df2 (diff)
revert r63988
Due to trunk-mjit CI failures: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130097 http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130196 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 1d401d4..07c22b0 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1236,12 +1236,12 @@ vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
}
}
-static inline rb_num_t
-vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
+static inline void
+vm_expandarray(rb_control_frame_t *cfp, VALUE ary, rb_num_t num, int flag)
{
int is_splat = flag & 0x01;
rb_num_t space_size = num + is_splat;
- VALUE *base = sp;
+ VALUE *base = cfp->sp;
const VALUE *ptr;
rb_num_t len;
const VALUE obj = ary;
@@ -1256,6 +1256,8 @@ vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
len = (rb_num_t)RARRAY_LEN(ary);
}
+ cfp->sp += space_size;
+
if (flag & 0x02) {
/* post: ..., nil ,ary[-1], ..., ary[0..-num] # top */
rb_num_t i = 0, j;
@@ -1297,7 +1299,6 @@ vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
}
}
RB_GC_GUARD(ary);
- return space_size;
}
static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc);