- `++a` is the one that is foldable
- transform `a++` into `++a` for better optimisation
This commit is contained in:
Alex Lam S.L
2017-03-05 17:15:37 +08:00
committed by GitHub
parent 33b5f31984
commit 067e5a5762
2 changed files with 22 additions and 4 deletions

View File

@@ -21,6 +21,16 @@ collapse: {
var a;
a = b(a / 2);
if (a < 0) {
a++;
++c;
return c / 2;
}
}
function f4(c) {
var a;
a = b(a / 2);
if (a < 0) {
a++;
c++;
return c / 2;
}
@@ -35,7 +45,11 @@ collapse: {
}
function f3(c) {
var a;
if ((a = b(a / 2)) < 0) return c++ / 2;
if ((a = b(a / 2)) < 0) return a++, ++c / 2;
}
function f4(c) {
var a;
if ((a = b(a / 2)) < 0) return a++, ++c / 2;
}
}
}