Skip to content
Permalink
Browse files
codegen: avoid unnecessary OP_MOVE after CASE
  • Loading branch information
matz committed Dec 3, 2016
1 parent 23c4ad0 commit c029c6c4440c730c1ed5b0d6a10e81cebe23ac9c
Showing 1 changed file with 3 additions and 1 deletion.
@@ -1520,7 +1520,9 @@ codegen(codegen_scope *s, node *tree, int val)
genop(s, MKOP_A(OP_LOADNIL, cursp()));
if (pos3) dispatch_linked(s, pos3);
if (head) pop();
genop(s, MKOP_AB(OP_MOVE, cursp(), pos));
if (cursp() != pos) {
genop(s, MKOP_AB(OP_MOVE, cursp(), pos));
}
push();
}
else {

0 comments on commit c029c6c

Please sign in to comment.