aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-01 16:34:58 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-01 16:34:58 -0800
commit22f0f113c706781fba92ab5fddbd17843091d288 (patch)
treeb5c0d659d5104a6d90b8624e8b709c3b18bbf819 /tools/test-js-optimizer.js
parent16c68271b2527d87a01dc9330c7030bde0f5803e (diff)
fix bug in loopOptimizer with not removing all unneeded labels
Diffstat (limited to 'tools/test-js-optimizer.js')
-rw-r--r--tools/test-js-optimizer.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/test-js-optimizer.js b/tools/test-js-optimizer.js
index e2bcb903..961cf491 100644
--- a/tools/test-js-optimizer.js
+++ b/tools/test-js-optimizer.js
@@ -251,4 +251,19 @@ function lua() {
__label__ = 176;
} else if ($1435 == 1) {}
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle", "lua"]
+function moreLabels() {
+ $for_cond$2 : while (1) { // even this label should vanish
+ if (!$cmp) {
+ break $for_cond$2;
+ }
+ $if_then$$for_inc$5 : do {
+ if ($cmp1) {
+ break $for_cond$2;
+ } else {
+ inc();
+ }
+ } while (0);
+ $if_then$$for_inc$5 : do {} while (0);
+ }
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle", "lua", "moreLabels"]