From 6b534134a78e3e43c344682c3585e1abab015216 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 27 Jun 2018 09:28:09 +0000 Subject: give up insn attr handles_frame I introduced this mechanism in r62051 to speed things up. Later it was reported that the change causes problems. I searched for workarounds but nothing seemed appropriate. I hereby officially give it up. The idea to move ADD_PC around was a mistake. Fixes [Bug #14809] and [Bug #14834]. Signed-off-by: Urabe, Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 3fac8eb1fa..07c22b03b3 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1237,11 +1237,11 @@ vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, } static inline void -vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag) +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 - 1; + 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; -- cgit v1.2.3