Commit ba9ca03e authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #693 from masamitsu-murase/modify_unless

Modify NODE_IF handling.
parents 54703d84 d48bb813
...@@ -1099,6 +1099,10 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -1099,6 +1099,10 @@ codegen(codegen_scope *s, node *tree, int val)
genop(s, MKOP_AsBx(OP_JMPNOT, cursp(), 0)); genop(s, MKOP_AsBx(OP_JMPNOT, cursp(), 0));
codegen(s, tree->cdr->car, val); codegen(s, tree->cdr->car, val);
if (val && !(tree->cdr->car)) {
genop(s, MKOP_A(OP_LOADNIL, cursp()));
push();
}
if (e) { if (e) {
if (val) pop(); if (val) pop();
pos2 = new_label(s); pos2 = new_label(s);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment