summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matz Matsumoto <[email protected]>2013-01-13 00:51:44 +0900
committerYukihiro Matz Matsumoto <[email protected]>2013-01-13 00:51:44 +0900
commita180460635f49ca955e2aa3d01642b1d30b049af (patch)
treec682900a2b06b9c9a4e4750ca9b01730482f9c4f /src
parent1bab7bc5117e34ed50145333ba2d6af77bc028d3 (diff)
downloadmruby-a180460635f49ca955e2aa3d01642b1d30b049af.tar.gz
mruby-a180460635f49ca955e2aa3d01642b1d30b049af.zip
eliminate unused hash expression more aggresively
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 7f80e9f77..7f1823ba6 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -1327,13 +1327,13 @@ codegen(codegen_scope *s, node *tree, int val)
int len = 0;
while (tree) {
- codegen(s, tree->car->car, VAL);
- codegen(s, tree->car->cdr, VAL);
+ codegen(s, tree->car->car, val);
+ codegen(s, tree->car->cdr, val);
len++;
tree = tree->cdr;
}
- pop_n(len*2);
if (val) {
+ pop_n(len*2);
genop(s, MKOP_ABC(OP_HASH, cursp(), cursp(), len));
push();
}