Merge pull request #521 from iij/pr-fix-broken-variable-ref-next-statement

fix: broken variable reference, use 'next' statement
This commit is contained in:
Yukihiro "Matz" Matsumoto
2012-10-31 12:27:18 -07:00
+4 -2
View File
@@ -1556,8 +1556,10 @@ codegen(codegen_scope *s, node *tree, int val)
genop(s, MKOP_sBx(OP_JMP, s->loop->pc1 - s->pc));
}
else {
codegen(s, tree, VAL);
pop();
if (tree) {
codegen(s, tree, VAL);
pop();
}
genop_peep(s, MKOP_AB(OP_RETURN, cursp(), OP_R_NORMAL), NOVAL);
}
if (val) push();