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.js315
1 files changed, 100 insertions, 215 deletions
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js
index de0747f9..904e56cf 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,11 +177,10 @@ function vars(x, y) {
var sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 152 | 0;
- HEAP32[sp + 8 >> 2] = x;
- HEAPF32[sp + 16 >> 2] = y;
- HEAP32[sp + 32 >> 2] = 0;
- HEAP32[sp + 36 >> 2] = 0;
- vars$1(sp);
+ 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;
HEAP32[sp + 24 >> 2] = 0;
@@ -192,6 +198,7 @@ function vars2(x, y) {
b = y * x;
a = c(1 + a);
b = c(2 + b);
+ a = c(3 + a);
HEAP32[sp + 24 >> 2] = a;
HEAPF32[sp + 32 >> 2] = b;
HEAP32[sp + 40 >> 2] = 0;
@@ -207,13 +214,11 @@ function vars3(x, y) {
var a = 0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 160 | 0;
- HEAP32[sp + 8 >> 2] = x;
- HEAPF32[sp + 16 >> 2] = y;
- HEAP32[sp + 24 >> 2] = a;
- HEAP32[sp + 40 >> 2] = 0;
- HEAP32[sp + 44 >> 2] = 0;
- vars3$1(sp);
- a = HEAP32[sp + 24 >> 2] | 0;
+ 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;
HEAP32[sp + 24 >> 2] = a;
@@ -230,15 +235,11 @@ function vars4(x, y) {
sp = STACKTOP;
STACKTOP = STACKTOP + 168 | 0;
a = x + y;
- HEAP32[sp + 8 >> 2] = x;
- HEAPF32[sp + 16 >> 2] = y;
- HEAP32[sp + 24 >> 2] = a;
- HEAPF32[sp + 32 >> 2] = b;
- HEAP32[sp + 48 >> 2] = 0;
- HEAP32[sp + 52 >> 2] = 0;
- vars4$1(sp);
- a = HEAP32[sp + 24 >> 2] | 0;
- b = +HEAPF32[sp + 32 >> 2];
+ 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;
@@ -255,7 +256,6 @@ function vars_w_stack(x, y) {
var a = 0, b = +0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 208 | 0;
- a = x + y;
HEAP32[sp + 24 >> 2] = x;
HEAPF32[sp + 32 >> 2] = y;
HEAP32[sp + 40 >> 2] = a;
@@ -276,19 +276,9 @@ function vars_w_stack(x, y) {
function chain() {
var helper$0 = 0, sp = 0;
sp = STACKTOP;
- STACKTOP = STACKTOP + 336 | 0;
+ STACKTOP = STACKTOP + 240 | 0;
helper$0 = 1;
HEAP32[sp + 8 >> 2] = helper$0;
- HEAP32[sp + 56 >> 2] = 0;
- HEAP32[sp + 60 >> 2] = 0;
- chain$5(sp);
- helper$0 = HEAP32[sp + 8 >> 2] | 0;
- HEAP32[sp + 8 >> 2] = helper$0;
- HEAP32[sp + 48 >> 2] = 0;
- HEAP32[sp + 52 >> 2] = 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;
chain$3(sp);
@@ -298,21 +288,10 @@ function chain() {
HEAP32[sp + 36 >> 2] = 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;
- 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;
- 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 +302,7 @@ function lin$0(sp) {
}
function lin$1(sp) {
sp = sp | 0;
+ c(4);
c(5);
c(6);
c(7);
@@ -331,10 +311,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 +325,8 @@ function lin2$0(sp) {
}
function lin2$1(sp) {
sp = sp | 0;
+ c(3);
+ c(4);
c(5);
c(6);
c(7);
@@ -353,6 +335,7 @@ function lin2$1(sp) {
c(10);
c(11);
c(12);
+ c(13);
}
function lin3$0(sp) {
sp = sp | 0;
@@ -369,21 +352,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 +366,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 +380,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 +406,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,6 +421,8 @@ function mix$1(sp) {
c(13);
c(14);
c(15);
+ c(16);
+ c(17);
}
function vars$0(sp) {
sp = sp | 0;
@@ -479,22 +434,11 @@ function vars$0(sp) {
c(7 + (x + y));
c(8 + y * x);
}
-function vars$1(sp) {
- sp = sp | 0;
- var x = 0, y = +0;
- x = HEAP32[sp + 8 >> 2] | 0;
- y = +HEAPF32[sp + 16 >> 2];
- 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;
+ var b = +0, a = 0;
a = HEAP32[sp + 24 >> 2] | 0;
b = +HEAPF32[sp + 32 >> 2];
- a = c(3 + a);
b = c(4 + b);
a = c(5 + a);
b = c(6 + b);
@@ -507,57 +451,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;
- x = HEAP32[sp + 8 >> 2] | 0;
- y = +HEAPF32[sp + 16 >> 2];
- 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;
x = HEAP32[sp + 8 >> 2] | 0;
a = HEAP32[sp + 24 >> 2] | 0;
b = +HEAPF32[sp + 32 >> 2];
- a = c(4 + a);
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;
- x = HEAP32[sp + 8 >> 2] | 0;
- y = +HEAPF32[sp + 16 >> 2];
- a = HEAP32[sp + 24 >> 2] | 0;
- b = +HEAPF32[sp + 32 >> 2];
- b = y * x;
- a = c(1 + a);
- a = c(2 + a);
- a = c(3 + a);
- HEAP32[sp + 24 >> 2] = a;
- HEAPF32[sp + 32 >> 2] = b;
-}
function vars_w_stack$0(sp) {
sp = sp | 0;
var a = 0, b = +0;
a = HEAP32[sp + 40 >> 2] | 0;
b = +HEAPF32[sp + 48 >> 2];
- a = c(4 + a);
a = c(5 + a);
a = c(6 + a);
b = c(7 + a);
@@ -567,15 +482,17 @@ function vars_w_stack$0(sp) {
}
function vars_w_stack$1(sp) {
sp = sp | 0;
- var y = +0, x = 0, a = 0, b = +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);
+ a = c(4 + a);
HEAP32[sp + 40 >> 2] = a;
HEAPF32[sp + 48 >> 2] = b;
}
@@ -583,23 +500,22 @@ function chain$0(sp) {
sp = sp | 0;
var helper$0 = 0;
helper$0 = HEAP32[sp + 8 >> 2] | 0;
- if (helper$0) {
- helper$0 = 0;
- if (x == 11) {
- print(11);
- } else if (x == 12) {
- print(12);
- } else {
- helper$0 = 1;
- }
- }
- if (helper$0) {
- helper$0 = 0;
- if (1) {
- print(99);
- } else {
- helper$0 = 1;
- }
+ if (x == 7) {
+ print(7);
+ } else if (x == 8) {
+ print(8);
+ } else if (x == 9) {
+ print(9);
+ } else if (x == 10) {
+ print(10);
+ } else if (x == 11) {
+ print(11);
+ } else if (x == 12) {
+ print(12);
+ } else if (1) {
+ print(99);
+ } else {
+ helper$0 = 1;
}
HEAP32[sp + 8 >> 2] = helper$0;
}
@@ -607,15 +523,20 @@ function chain$1(sp) {
sp = sp | 0;
var helper$0 = 0;
helper$0 = HEAP32[sp + 8 >> 2] | 0;
- if (helper$0) {
- helper$0 = 0;
- if (x == 9) {
- print(9);
- } else if (x == 10) {
- print(10);
- } else {
- helper$0 = 1;
- }
+ if (x == 1) {
+ print(1);
+ } else if (x == 2) {
+ print(2);
+ } else if (x == 3) {
+ print(3);
+ } else if (x == 4) {
+ print(4);
+ } else if (x == 5) {
+ print(5);
+ } else if (x == 6) {
+ print(6);
+ } else {
+ helper$0 = 1;
}
HEAP32[sp + 8 >> 2] = helper$0;
}
@@ -625,13 +546,11 @@ 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) {
- print(8);
- } else {
- helper$0 = 1;
- }
+ HEAP32[sp + 8 >> 2] = helper$0;
+ HEAP32[sp + 16 >> 2] = 0;
+ HEAP32[sp + 20 >> 2] = 0;
+ chain$0(sp);
+ helper$0 = HEAP32[sp + 8 >> 2] | 0;
}
HEAP32[sp + 8 >> 2] = helper$0;
}
@@ -641,45 +560,11 @@ 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) {
- print(6);
- } else {
- helper$0 = 1;
- }
- }
- HEAP32[sp + 8 >> 2] = helper$0;
-}
-function chain$4(sp) {
- sp = sp | 0;
- var helper$0 = 0;
- helper$0 = HEAP32[sp + 8 >> 2] | 0;
- if (helper$0) {
- helper$0 = 0;
- if (x == 3) {
- print(3);
- } else 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);
- } else {
- helper$0 = 1;
- }
+ HEAP32[sp + 8 >> 2] = helper$0;
+ HEAP32[sp + 24 >> 2] = 0;
+ HEAP32[sp + 28 >> 2] = 0;
+ chain$1(sp);
+ helper$0 = HEAP32[sp + 8 >> 2] | 0;
}
HEAP32[sp + 8 >> 2] = helper$0;
}