aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-asm-outline1-output.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test-js-optimizer-asm-outline1-output.js')
-rw-r--r--tools/test-js-optimizer-asm-outline1-output.js304
1 files changed, 133 insertions, 171 deletions
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js
index 5027f680..d8ea9446 100644
--- a/tools/test-js-optimizer-asm-outline1-output.js
+++ b/tools/test-js-optimizer-asm-outline1-output.js
@@ -5,7 +5,6 @@ function lin() {
c(1);
c(2);
c(3);
- c(4);
HEAP32[sp + 16 >> 2] = 0;
HEAP32[sp + 20 >> 2] = 0;
lin$1(sp);
@@ -21,8 +20,6 @@ function lin2() {
while (1) {
c(1);
c(2);
- c(3);
- c(4);
HEAP32[sp + 16 >> 2] = 0;
HEAP32[sp + 20 >> 2] = 0;
lin2$1(sp);
@@ -42,9 +39,14 @@ function lin3() {
c(3);
c(4);
c(5);
- HEAP32[sp + 16 >> 2] = 0;
- HEAP32[sp + 20 >> 2] = 0;
- lin3$1(sp);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
HEAP32[sp + 8 >> 2] = 0;
HEAP32[sp + 12 >> 2] = 0;
lin3$0(sp);
@@ -70,9 +72,15 @@ function lin4() {
c(2);
c(3);
c(4);
- HEAP32[sp + 16 >> 2] = 0;
- HEAP32[sp + 20 >> 2] = 0;
- lin4$1(sp);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
HEAP32[sp + 8 >> 2] = 0;
HEAP32[sp + 12 >> 2] = 0;
lin4$0(sp);
@@ -97,9 +105,15 @@ function lin5() {
c(2);
c(3);
c(4);
- HEAP32[sp + 16 >> 2] = 0;
- HEAP32[sp + 20 >> 2] = 0;
- lin5$1(sp);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
HEAP32[sp + 8 >> 2] = 0;
HEAP32[sp + 12 >> 2] = 0;
lin5$0(sp);
@@ -120,13 +134,6 @@ function mix() {
sp = STACKTOP;
STACKTOP = STACKTOP + 168 | 0;
main : while (1) {
- c(1);
- c(2);
- c(3);
- c(4);
- c(5);
- c(6);
- c(7);
HEAP32[sp + 16 >> 2] = 0;
HEAP32[sp + 20 >> 2] = 0;
mix$1(sp);
@@ -170,15 +177,14 @@ function vars(x, y) {
var sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 152 | 0;
- HEAP32[sp + 32 >> 2] = 0;
- HEAP32[sp + 36 >> 2] = 0;
+ c(1 + (x + y));
+ c(2 + y * x);
+ c(3 + (x + y));
+ c(4 + y * x);
HEAP32[sp + 8 >> 2] = x;
HEAPF32[sp + 16 >> 2] = y;
- vars$1(sp);
HEAP32[sp + 24 >> 2] = 0;
HEAP32[sp + 28 >> 2] = 0;
- HEAP32[sp + 8 >> 2] = x;
- HEAPF32[sp + 16 >> 2] = y;
vars$0(sp);
STACKTOP = sp;
}
@@ -192,10 +198,11 @@ function vars2(x, y) {
b = y * x;
a = c(1 + a);
b = c(2 + b);
- HEAP32[sp + 40 >> 2] = 0;
- HEAP32[sp + 44 >> 2] = 0;
+ a = c(3 + a);
HEAP32[sp + 24 >> 2] = a;
HEAPF32[sp + 32 >> 2] = b;
+ HEAP32[sp + 40 >> 2] = 0;
+ HEAP32[sp + 44 >> 2] = 0;
vars2$0(sp);
a = HEAP32[sp + 24 >> 2] | 0;
b = +HEAPF32[sp + 32 >> 2];
@@ -207,18 +214,16 @@ function vars3(x, y) {
var a = 0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 160 | 0;
- HEAP32[sp + 40 >> 2] = 0;
- HEAP32[sp + 44 >> 2] = 0;
- HEAP32[sp + 24 >> 2] = a;
+ a = x + y;
+ a = c(1 + a);
+ a = c(2 + y * x);
+ a = c(3 + a);
+ a = c(4 + y * x);
HEAP32[sp + 8 >> 2] = x;
HEAPF32[sp + 16 >> 2] = y;
- vars3$1(sp);
- a = HEAP32[sp + 24 >> 2] | 0;
+ HEAP32[sp + 24 >> 2] = a;
HEAP32[sp + 32 >> 2] = 0;
HEAP32[sp + 36 >> 2] = 0;
- HEAP32[sp + 24 >> 2] = a;
- HEAPF32[sp + 16 >> 2] = y;
- HEAP32[sp + 8 >> 2] = x;
vars3$0(sp);
a = HEAP32[sp + 24 >> 2] | 0;
STACKTOP = sp;
@@ -230,20 +235,16 @@ function vars4(x, y) {
sp = STACKTOP;
STACKTOP = STACKTOP + 168 | 0;
a = x + y;
- HEAP32[sp + 48 >> 2] = 0;
- HEAP32[sp + 52 >> 2] = 0;
- HEAPF32[sp + 16 >> 2] = y;
+ b = y * x;
+ a = c(1 + a);
+ a = c(2 + a);
+ a = c(3 + a);
+ a = c(4 + a);
HEAP32[sp + 8 >> 2] = x;
HEAP32[sp + 24 >> 2] = a;
HEAPF32[sp + 32 >> 2] = b;
- vars4$1(sp);
- b = +HEAPF32[sp + 32 >> 2];
- a = HEAP32[sp + 24 >> 2] | 0;
HEAP32[sp + 40 >> 2] = 0;
HEAP32[sp + 44 >> 2] = 0;
- HEAP32[sp + 24 >> 2] = a;
- HEAP32[sp + 8 >> 2] = x;
- HEAPF32[sp + 32 >> 2] = b;
vars4$0(sp);
a = HEAP32[sp + 24 >> 2] | 0;
b = +HEAPF32[sp + 32 >> 2];
@@ -255,20 +256,19 @@ function vars_w_stack(x, y) {
var a = 0, b = +0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 208 | 0;
- a = x + y;
- HEAP32[sp + 72 >> 2] = 0;
- HEAP32[sp + 76 >> 2] = 0;
- HEAPF32[sp + 32 >> 2] = y;
HEAP32[sp + 24 >> 2] = x;
+ HEAPF32[sp + 32 >> 2] = y;
HEAP32[sp + 40 >> 2] = a;
HEAPF32[sp + 48 >> 2] = b;
+ HEAP32[sp + 72 >> 2] = 0;
+ HEAP32[sp + 76 >> 2] = 0;
vars_w_stack$1(sp);
- b = +HEAPF32[sp + 48 >> 2];
a = HEAP32[sp + 40 >> 2] | 0;
- HEAP32[sp + 64 >> 2] = 0;
- HEAP32[sp + 68 >> 2] = 0;
+ b = +HEAPF32[sp + 48 >> 2];
HEAP32[sp + 40 >> 2] = a;
HEAPF32[sp + 48 >> 2] = b;
+ HEAP32[sp + 64 >> 2] = 0;
+ HEAP32[sp + 68 >> 2] = 0;
vars_w_stack$0(sp);
a = HEAP32[sp + 40 >> 2] | 0;
b = +HEAPF32[sp + 48 >> 2];
@@ -276,43 +276,53 @@ function vars_w_stack(x, y) {
function chain() {
var helper$0 = 0, sp = 0;
sp = STACKTOP;
- STACKTOP = STACKTOP + 336 | 0;
+ STACKTOP = STACKTOP + 464 | 0;
helper$0 = 1;
- HEAP32[sp + 56 >> 2] = 0;
- HEAP32[sp + 60 >> 2] = 0;
+ if (helper$0) {
+ helper$0 = 0;
+ if (x == 1) {
+ print(1);
+ } else {
+ helper$0 = 1;
+ }
+ }
+ if (helper$0) {
+ helper$0 = 0;
+ if (x == 2) {
+ print(2);
+ } else {
+ helper$0 = 1;
+ }
+ }
HEAP32[sp + 8 >> 2] = helper$0;
- chain$5(sp);
- helper$0 = HEAP32[sp + 8 >> 2] | 0;
HEAP32[sp + 48 >> 2] = 0;
HEAP32[sp + 52 >> 2] = 0;
- HEAP32[sp + 8 >> 2] = helper$0;
chain$4(sp);
helper$0 = HEAP32[sp + 8 >> 2] | 0;
+ HEAP32[sp + 8 >> 2] = helper$0;
HEAP32[sp + 40 >> 2] = 0;
HEAP32[sp + 44 >> 2] = 0;
- HEAP32[sp + 8 >> 2] = helper$0;
chain$3(sp);
helper$0 = HEAP32[sp + 8 >> 2] | 0;
+ HEAP32[sp + 8 >> 2] = helper$0;
HEAP32[sp + 32 >> 2] = 0;
HEAP32[sp + 36 >> 2] = 0;
- HEAP32[sp + 8 >> 2] = helper$0;
chain$2(sp);
helper$0 = HEAP32[sp + 8 >> 2] | 0;
+ HEAP32[sp + 8 >> 2] = helper$0;
HEAP32[sp + 24 >> 2] = 0;
HEAP32[sp + 28 >> 2] = 0;
- HEAP32[sp + 8 >> 2] = helper$0;
chain$1(sp);
helper$0 = HEAP32[sp + 8 >> 2] | 0;
+ HEAP32[sp + 8 >> 2] = helper$0;
HEAP32[sp + 16 >> 2] = 0;
HEAP32[sp + 20 >> 2] = 0;
- HEAP32[sp + 8 >> 2] = helper$0;
chain$0(sp);
helper$0 = HEAP32[sp + 8 >> 2] | 0;
STACKTOP = sp;
}
function lin$0(sp) {
sp = sp | 0;
- c(13);
c(14);
c(15);
c(16);
@@ -323,6 +333,7 @@ function lin$0(sp) {
}
function lin$1(sp) {
sp = sp | 0;
+ c(4);
c(5);
c(6);
c(7);
@@ -331,10 +342,10 @@ function lin$1(sp) {
c(10);
c(11);
c(12);
+ c(13);
}
function lin2$0(sp) {
sp = sp | 0;
- c(13);
c(14);
c(15);
c(16);
@@ -345,6 +356,8 @@ function lin2$0(sp) {
}
function lin2$1(sp) {
sp = sp | 0;
+ c(3);
+ c(4);
c(5);
c(6);
c(7);
@@ -353,6 +366,7 @@ function lin2$1(sp) {
c(10);
c(11);
c(12);
+ c(13);
}
function lin3$0(sp) {
sp = sp | 0;
@@ -369,21 +383,9 @@ function lin3$0(sp) {
break OL;
} while (0);
}
-function lin3$1(sp) {
- sp = sp | 0;
- c(6);
- c(7);
- c(8);
- c(9);
- c(10);
- c(11);
- c(12);
- c(13);
-}
function lin4$0(sp) {
sp = sp | 0;
OL : do {
- c(13);
c(14);
c(15);
c(16);
@@ -395,21 +397,9 @@ function lin4$0(sp) {
break OL;
} while (0);
}
-function lin4$1(sp) {
- sp = sp | 0;
- c(5);
- c(6);
- c(7);
- c(8);
- c(9);
- c(10);
- c(11);
- c(12);
-}
function lin5$0(sp) {
sp = sp | 0;
OL : do {
- c(13);
c(14);
c(15);
c(16);
@@ -421,22 +411,9 @@ function lin5$0(sp) {
break OL;
} while (0);
}
-function lin5$1(sp) {
- sp = sp | 0;
- c(5);
- c(6);
- c(7);
- c(8);
- c(9);
- c(10);
- c(11);
- c(12);
-}
function mix$0(sp) {
sp = sp | 0;
OL : do {
- c(16);
- c(17);
HEAP32[sp + 8 >> 2] = 2;
HEAP32[sp + 12 >> 2] = 2;
break OL;
@@ -460,6 +437,13 @@ function mix$0(sp) {
}
function mix$1(sp) {
sp = sp | 0;
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
c(8);
c(9);
c(10);
@@ -468,33 +452,24 @@ function mix$1(sp) {
c(13);
c(14);
c(15);
+ c(16);
+ c(17);
}
function vars$0(sp) {
sp = sp | 0;
var x = 0, y = +0;
- y = +HEAPF32[sp + 16 >> 2];
x = HEAP32[sp + 8 >> 2] | 0;
+ y = +HEAPF32[sp + 16 >> 2];
c(5 + (x + y));
c(6 + y * x);
c(7 + (x + y));
c(8 + y * x);
}
-function vars$1(sp) {
- sp = sp | 0;
- var x = 0, y = +0;
- y = +HEAPF32[sp + 16 >> 2];
- x = HEAP32[sp + 8 >> 2] | 0;
- c(1 + (x + y));
- c(2 + y * x);
- c(3 + (x + y));
- c(4 + y * x);
-}
function vars2$0(sp) {
sp = sp | 0;
- var a = 0, b = +0;
- b = +HEAPF32[sp + 32 >> 2];
+ var b = +0, a = 0;
a = HEAP32[sp + 24 >> 2] | 0;
- a = c(3 + a);
+ b = +HEAPF32[sp + 32 >> 2];
b = c(4 + b);
a = c(5 + a);
b = c(6 + b);
@@ -507,57 +482,28 @@ function vars3$0(sp) {
x = HEAP32[sp + 8 >> 2] | 0;
y = +HEAPF32[sp + 16 >> 2];
a = HEAP32[sp + 24 >> 2] | 0;
- a = c(4 + y * x);
a = c(5 + a);
a = c(6 + y * x);
a = c(7 + a);
HEAP32[sp + 24 >> 2] = a;
}
-function vars3$1(sp) {
- sp = sp | 0;
- var a = 0, x = 0, y = +0;
- y = +HEAPF32[sp + 16 >> 2];
- x = HEAP32[sp + 8 >> 2] | 0;
- a = HEAP32[sp + 24 >> 2] | 0;
- a = x + y;
- a = c(1 + a);
- a = c(2 + y * x);
- a = c(3 + a);
- HEAP32[sp + 24 >> 2] = a;
-}
function vars4$0(sp) {
sp = sp | 0;
var a = 0, x = 0, b = +0;
- b = +HEAPF32[sp + 32 >> 2];
x = HEAP32[sp + 8 >> 2] | 0;
a = HEAP32[sp + 24 >> 2] | 0;
- a = c(4 + a);
+ b = +HEAPF32[sp + 32 >> 2];
a = c(5 + a);
a = c(6 + a);
b = c(7 + a + x);
HEAP32[sp + 24 >> 2] = a;
HEAPF32[sp + 32 >> 2] = b;
}
-function vars4$1(sp) {
- sp = sp | 0;
- var y = +0, x = 0, a = 0, b = +0;
- b = +HEAPF32[sp + 32 >> 2];
- a = HEAP32[sp + 24 >> 2] | 0;
- x = HEAP32[sp + 8 >> 2] | 0;
- y = +HEAPF32[sp + 16 >> 2];
- b = y * x;
- a = c(1 + a);
- a = c(2 + a);
- a = c(3 + a);
- HEAPF32[sp + 32 >> 2] = b;
- HEAP32[sp + 24 >> 2] = a;
-}
function vars_w_stack$0(sp) {
sp = sp | 0;
var a = 0, b = +0;
- b = +HEAPF32[sp + 48 >> 2];
a = HEAP32[sp + 40 >> 2] | 0;
- a = c(4 + a);
+ b = +HEAPF32[sp + 48 >> 2];
a = c(5 + a);
a = c(6 + a);
b = c(7 + a);
@@ -567,17 +513,19 @@ function vars_w_stack$0(sp) {
}
function vars_w_stack$1(sp) {
sp = sp | 0;
- var y = +0, x = 0, a = 0, b = +0;
- b = +HEAPF32[sp + 48 >> 2];
- a = HEAP32[sp + 40 >> 2] | 0;
+ var a = 0, x = 0, y = +0, b = +0;
x = HEAP32[sp + 24 >> 2] | 0;
y = +HEAPF32[sp + 32 >> 2];
+ a = HEAP32[sp + 40 >> 2] | 0;
+ b = +HEAPF32[sp + 48 >> 2];
+ a = x + y;
b = y * x;
a = c(1 + a);
a = c(2 + a);
a = c(3 + a);
- HEAPF32[sp + 48 >> 2] = b;
+ a = c(4 + a);
HEAP32[sp + 40 >> 2] = a;
+ HEAPF32[sp + 48 >> 2] = b;
}
function chain$0(sp) {
sp = sp | 0;
@@ -585,9 +533,7 @@ function chain$0(sp) {
helper$0 = HEAP32[sp + 8 >> 2] | 0;
if (helper$0) {
helper$0 = 0;
- if (x == 11) {
- print(11);
- } else if (x == 12) {
+ if (x == 12) {
print(12);
} else {
helper$0 = 1;
@@ -609,14 +555,20 @@ function chain$1(sp) {
helper$0 = HEAP32[sp + 8 >> 2] | 0;
if (helper$0) {
helper$0 = 0;
- if (x == 9) {
- print(9);
- } else if (x == 10) {
+ if (x == 10) {
print(10);
} else {
helper$0 = 1;
}
}
+ if (helper$0) {
+ helper$0 = 0;
+ if (x == 11) {
+ print(11);
+ } else {
+ helper$0 = 1;
+ }
+ }
HEAP32[sp + 8 >> 2] = helper$0;
}
function chain$2(sp) {
@@ -625,14 +577,20 @@ function chain$2(sp) {
helper$0 = HEAP32[sp + 8 >> 2] | 0;
if (helper$0) {
helper$0 = 0;
- if (x == 7) {
- print(7);
- } else if (x == 8) {
+ if (x == 8) {
print(8);
} else {
helper$0 = 1;
}
}
+ if (helper$0) {
+ helper$0 = 0;
+ if (x == 9) {
+ print(9);
+ } else {
+ helper$0 = 1;
+ }
+ }
HEAP32[sp + 8 >> 2] = helper$0;
}
function chain$3(sp) {
@@ -641,14 +599,20 @@ function chain$3(sp) {
helper$0 = HEAP32[sp + 8 >> 2] | 0;
if (helper$0) {
helper$0 = 0;
- if (x == 5) {
- print(5);
- } else if (x == 6) {
+ if (x == 6) {
print(6);
} else {
helper$0 = 1;
}
}
+ if (helper$0) {
+ helper$0 = 0;
+ if (x == 7) {
+ print(7);
+ } else {
+ helper$0 = 1;
+ }
+ }
HEAP32[sp + 8 >> 2] = helper$0;
}
function chain$4(sp) {
@@ -659,24 +623,22 @@ function chain$4(sp) {
helper$0 = 0;
if (x == 3) {
print(3);
- } else if (x == 4) {
+ } else {
+ helper$0 = 1;
+ }
+ }
+ if (helper$0) {
+ helper$0 = 0;
+ if (x == 4) {
print(4);
} else {
helper$0 = 1;
}
}
- HEAP32[sp + 8 >> 2] = helper$0;
-}
-function chain$5(sp) {
- sp = sp | 0;
- var helper$0 = 0;
- helper$0 = HEAP32[sp + 8 >> 2] | 0;
if (helper$0) {
helper$0 = 0;
- if (x == 1) {
- print(1);
- } else if (x == 2) {
- print(2);
+ if (x == 5) {
+ print(5);
} else {
helper$0 = 1;
}