fix too much optimization for `||=`

parent d098d823
...@@ -1774,7 +1774,12 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -1774,7 +1774,12 @@ codegen(codegen_scope *s, node *tree, int val)
int pos; int pos;
pop(); pop();
pos = genop_peep(s, MKOP_AsBx(name[0]=='|'?OP_JMPIF:OP_JMPNOT, cursp(), 0), NOVAL); if (val) {
pos = genop(s, MKOP_AsBx(name[0]=='|'?OP_JMPIF:OP_JMPNOT, cursp(), 0));
}
else {
pos = genop_peep(s, MKOP_AsBx(name[0]=='|'?OP_JMPIF:OP_JMPNOT, cursp(), 0), NOVAL);
}
codegen(s, tree->cdr->cdr->car, VAL); codegen(s, tree->cdr->cdr->car, VAL);
pop(); pop();
gen_assignment(s, tree->car, cursp(), val); gen_assignment(s, tree->car, cursp(), val);
......
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