diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-08-01 02:33:55 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-08-01 02:33:55 +0900 |
| commit | 0220953efe0c4dba5ce4af5057faa2d56fda6553 (patch) | |
| tree | 2a1f7958f7043c652bc7797b24bff831ebab4281 /src/vm.c | |
| parent | 1a541208697a80cdff52c7dbd0b0fc1e0a754b90 (diff) | |
| download | mruby-0220953efe0c4dba5ce4af5057faa2d56fda6553.tar.gz mruby-0220953efe0c4dba5ce4af5057faa2d56fda6553.zip | |
no OP_LOADNIL for operators (OP_ADD, etc)
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1211,6 +1211,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) break;\ s\ default:\ + SET_NIL_VALUE(regs[a+2]);\ i = MKOP_ABC(OP_SEND, a, GETARG_B(i), GETARG_C(i));\ goto L_SEND;\ }\ @@ -1257,6 +1258,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) regs[a].value.f += GETARG_C(i); break; default: + SET_NIL_VALUE(regs[a+2]); SET_INT_VALUE(regs[a+1], GETARG_C(i)); i = MKOP_ABC(OP_SEND, a, GETARG_B(i), 1); goto L_SEND; @@ -1277,6 +1279,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) regs[a].value.f -= GETARG_C(i); break; default: + SET_NIL_VALUE(regs[a+2]); SET_INT_VALUE(regs[a+1], GETARG_C(i)); i = MKOP_ABC(OP_SEND, a, GETARG_B(i), 1); goto L_SEND; @@ -1310,6 +1313,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) OP_CMP_BODY(op,f,f);\ break;\ default:\ + SET_NIL_VALUE(regs[a+2]);\ i = MKOP_ABC(OP_SEND, a, GETARG_B(i), GETARG_C(i));\ goto L_SEND;\ }\ |
