We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a8714a commit 7f73340Copy full SHA for 7f73340
1 file changed
src/compiler/peephole.cc
@@ -524,6 +524,13 @@ class peephole
524
del(3); del(2); del(1); del(0); i--;
525
continue;
526
}
527
+ // TOK_NUM / 0 / TOK_ADD_VAR -> TOK_VAR_LOAD
528
+ if( mtok(0,TOK_NUM) && mword(1) && val(1) == 0 &&
529
+ mtok(2,TOK_ADD_VAR) )
530
+ {
531
+ del(1); del(0); set_tok(0, TOK_VAR_LOAD); i--;
532
+ continue;
533
+ }
534
// TOK_PUSH / TOK_NUM / 0 / TOK_SUB -> -
535
if( mtok(0,TOK_PUSH) && mtok(1,TOK_NUM) && mword(2) &&
536
val(2) == 0 && mtok(3,TOK_SUB) )
0 commit comments