Skip to content
Permalink
Browse files
fix too much optimization for ||=
  • Loading branch information
matz committed Mar 31, 2016
1 parent d098d82 commit e1e888e354abbd7fc3b14302675a5ef6b0dde8af
Showing 1 changed file with 6 additions and 1 deletion.
@@ -1774,7 +1774,12 @@ codegen(codegen_scope *s, node *tree, int val)
int pos;

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);
pop();
gen_assignment(s, tree->car, cursp(), val);

0 comments on commit e1e888e

Please sign in to comment.