aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-output.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-22 18:41:02 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-22 18:41:02 -0800
commit58f9fb35ab2f8440ff36d9353f18e390473f19d6 (patch)
treede525381b5e821cde5b473f7ba14c05c860fe519 /tools/test-js-optimizer-output.js
parent6eaf330462b1da305acaf9ba5d02dea3a34ae711 (diff)
fix some hoisting bugs, including not hoisting inside inner loops
Diffstat (limited to 'tools/test-js-optimizer-output.js')
-rw-r--r--tools/test-js-optimizer-output.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/tools/test-js-optimizer-output.js b/tools/test-js-optimizer-output.js
index 7b5cbae8..295144f2 100644
--- a/tools/test-js-optimizer-output.js
+++ b/tools/test-js-optimizer-output.js
@@ -186,4 +186,23 @@ function demangle($cmp) {
final();
}
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle"]
+function lua() {
+ while (1) {
+ do {
+ if ($14) {
+ __label__ = 3;
+ } else {
+ __label__ = 4;
+ var $17 = $i;
+ var $18 = $3;
+ var $19 = $18 + ($17 << 2) | 0;
+ var $20 = HEAP32[$19 >> 2];
+ var $21 = $20 + 1 | 0;
+ var $22 = HEAP8[$21];
+ var $23 = $22 << 24 >> 24;
+ break;
+ }
+ } while (0);
+ }
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle", "lua"]