From 58f9fb35ab2f8440ff36d9353f18e390473f19d6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 22 Dec 2011 18:41:02 -0800 Subject: fix some hoisting bugs, including not hoisting inside inner loops --- tools/test-js-optimizer-output.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tools/test-js-optimizer-output.js') 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"] -- cgit v1.2.3-18-g5258