aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/test-js-optimizer-asm-outline1-output.js45
-rw-r--r--tools/test-js-optimizer-asm-outline1.js26
2 files changed, 71 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-asm-outline1-output.js b/tools/test-js-optimizer-asm-outline1-output.js
index 2c684622..0949865a 100644
--- a/tools/test-js-optimizer-asm-outline1-output.js
+++ b/tools/test-js-optimizer-asm-outline1-output.js
@@ -16,6 +16,27 @@ function lin2() {
lin2$0(sp);
}
}
+function lin3() {
+ while (1) {
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ lin3$1(sp);
+ lin3$0(sp);
+ if (HEAP32[sp + 0 >> 2] == 5) {
+ return;
+ }
+ if (HEAP32[sp + 0 >> 2] == 6) {
+ return HEAP32[sp + 8 >> 2];
+ }
+ if (HEAP32[sp + 0 >> 2] == 7) {
+ return HEAPF32[sp + 8 >> 2];
+ }
+ }
+ return 20;
+}
function lin$0(sp) {
sp = sp | 0;
c(13);
@@ -60,4 +81,28 @@ function lin2$1(sp) {
c(11);
c(12);
}
+function lin3$0(sp) {
+ sp = sp | 0;
+ OL : do {
+ c(14);
+ c(15);
+ c(16);
+ c(17);
+ c(18);
+ c(19);
+ c(20);
+ HEAP32[sp + 8 >> 2] = 10, HEAP32[sp + 0 >> 2] = 6, 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);
+}
diff --git a/tools/test-js-optimizer-asm-outline1.js b/tools/test-js-optimizer-asm-outline1.js
index b4f55bd7..9d41b727 100644
--- a/tools/test-js-optimizer-asm-outline1.js
+++ b/tools/test-js-optimizer-asm-outline1.js
@@ -44,5 +44,31 @@ function lin2() {
c(20);
}
}
+function lin3() {
+ while (1) {
+ c(1);
+ c(2);
+ c(3);
+ c(4);
+ c(5);
+ c(6);
+ c(7);
+ c(8);
+ c(9);
+ c(10);
+ c(11);
+ c(12);
+ c(13);
+ c(14);
+ c(15);
+ c(16);
+ c(17);
+ c(18);
+ c(19);
+ c(20);
+ return 10;
+ }
+ return 20;
+}
// EMSCRIPTEN_GENERATED_FUNCTIONS
// EXTRA_INFO: { "sizeToOutline": 30 }