summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-02-22 09:55:51 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2016-02-22 09:55:51 +0900
commitb8479b62d8c9fc5e2333dcc9b2ad396fc219795a (patch)
tree3e18288663295c72370e1e568ec419d021be7d28
parent81acbd2dd1f7bf2462dc4e7ea064da125f160fd3 (diff)
downloadmruby-b8479b62d8c9fc5e2333dcc9b2ad396fc219795a.tar.gz
mruby-b8479b62d8c9fc5e2333dcc9b2ad396fc219795a.zip
too many register push for else-less condtions; fix #3117
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 52611c19e..22b385547 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -1358,10 +1358,6 @@ codegen(codegen_scope *s, node *tree, int val)
pos1 = genop_peep(s, MKOP_AsBx(OP_JMPNOT, cursp(), 0), NOVAL);
codegen(s, tree->cdr->car, val);
- if (val && !(tree->cdr->car)) {
- genop(s, MKOP_A(OP_LOADNIL, cursp()));
- push();
- }
if (e) {
if (val) pop();
pos2 = genop(s, MKOP_sBx(OP_JMP, 0));