diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-25 18:02:01 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-25 18:02:01 +0000 |
commit | 13b5b22ae63cb35adc7e73f8f3d248a6ffd46ad1 (patch) | |
tree | 06c31626bec772304b5435fc49f4fbf2c84eb3a6 /insns.def | |
parent | 42dcda08aef365e166b8784e0349a28896a871e6 (diff) |
* compile.c, compile.h: fix stack pointer issues.
calculate correct stack depth at compile time.
* insns.def (emptstack): remove it and add a new insn "adjuststack".
* bootstraptest/test_knownbug.rb: move/remove fixed test.
* bootstraptest/test_syntax.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -695,12 +695,12 @@ setn @j current stack を空にする。 */ DEFINE_INSN -emptstack -() +adjuststack +(rb_num_t n) (...) -(...) // inc = 0; depth = 0; +(...) // inc -= n { - SET_SP(GET_CFP()->bp); + INC_SP(-n); } @@ -1060,7 +1060,7 @@ DEFINE_INSN invokesuper (rb_num_t op_argc, ISEQ blockiseq, rb_num_t op_flag) (...) -(VALUE val) // inc += - op_argc; +(VALUE val) // inc += - (op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0)); { rb_block_t *blockptr = !(op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? GET_BLOCK_PTR() : 0; int num = caller_setup_args(th, GET_CFP(), op_flag, op_argc, blockiseq, &blockptr); |