diff options
-rwxr-xr-x | tests/runner.py | 2 | ||||
-rw-r--r-- | tools/eliminator/eliminator-test-output.js | 1 | ||||
-rw-r--r-- | tools/eliminator/safe-eliminator-test-output.js | 1 | ||||
-rw-r--r-- | tools/test-js-optimizer-output.js | 1 | ||||
-rw-r--r-- | tools/test-js-optimizer-regs-output.js | 1 | ||||
-rw-r--r-- | tools/test-js-optimizer-t2-output.js | 1 | ||||
-rw-r--r-- | tools/test-js-optimizer-t2c-output.js | 1 | ||||
-rw-r--r-- | tools/test-js-optimizer-t3-output.js | 49 |
8 files changed, 50 insertions, 7 deletions
diff --git a/tests/runner.py b/tests/runner.py index 5c43d39a..f523ffb4 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -8295,7 +8295,7 @@ f.close() (path_from_root('tools', 'test-js-optimizer-t2.js'), open(path_from_root('tools', 'test-js-optimizer-t2-output.js')).read(), ['simplifyExpressionsPre', 'optimizeShiftsAggressive']), # Make sure that optimizeShifts handles functions with shift statements. - (path_from_root('tools', 'test-js-optimizer-t3.js'), open(path_from_root('tools', 'test-js-optimizer-t3.js')).read(), + (path_from_root('tools', 'test-js-optimizer-t3.js'), open(path_from_root('tools', 'test-js-optimizer-t3-output.js')).read(), ['optimizeShiftsAggressive']), (path_from_root('tools', 'test-js-optimizer-regs.js'), open(path_from_root('tools', 'test-js-optimizer-regs-output.js')).read(), ['registerize']), diff --git a/tools/eliminator/eliminator-test-output.js b/tools/eliminator/eliminator-test-output.js index 00647fca..ede34103 100644 --- a/tools/eliminator/eliminator-test-output.js +++ b/tools/eliminator/eliminator-test-output.js @@ -6132,5 +6132,4 @@ function _mallocNoU($bytes) { return $mem_0; return null; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"] diff --git a/tools/eliminator/safe-eliminator-test-output.js b/tools/eliminator/safe-eliminator-test-output.js index bb3f17e6..57f0a743 100644 --- a/tools/eliminator/safe-eliminator-test-output.js +++ b/tools/eliminator/safe-eliminator-test-output.js @@ -82,5 +82,4 @@ function a($directory) { print(zzz1); } while (1); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a"] diff --git a/tools/test-js-optimizer-output.js b/tools/test-js-optimizer-output.js index 9c9fa063..730426b1 100644 --- a/tools/test-js-optimizer-output.js +++ b/tools/test-js-optimizer-output.js @@ -279,5 +279,4 @@ function notComps() { function tricky() { var $conv642 = $conv6374 - (($132 << 16 >> 16 | 0) / 2 & -1) & 65535; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle", "lua", "moreLabels", "notComps", "tricky"] diff --git a/tools/test-js-optimizer-regs-output.js b/tools/test-js-optimizer-regs-output.js index 2f91f52b..90b67a47 100644 --- a/tools/test-js-optimizer-regs-output.js +++ b/tools/test-js-optimizer-regs-output.js @@ -225,5 +225,4 @@ function switchey(x) { r8 = x + 2; pp(r8); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["test", "primes", "atomic", "fcntl_open", "ex", "switchey"] diff --git a/tools/test-js-optimizer-t2-output.js b/tools/test-js-optimizer-t2-output.js index 62cd6e0d..0ae66be5 100644 --- a/tools/test-js-optimizer-t2-output.js +++ b/tools/test-js-optimizer-t2-output.js @@ -88,5 +88,4 @@ function shifty($id2) { q(go() << 16); q(go() + 2 >> 2); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"] diff --git a/tools/test-js-optimizer-t2c-output.js b/tools/test-js-optimizer-t2c-output.js index f41bb815..726112ec 100644 --- a/tools/test-js-optimizer-t2c-output.js +++ b/tools/test-js-optimizer-t2c-output.js @@ -14,5 +14,4 @@ function shifty() { q($13 + 13 << 2); q(h() >> 2 << 2); } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"] diff --git a/tools/test-js-optimizer-t3-output.js b/tools/test-js-optimizer-t3-output.js new file mode 100644 index 00000000..924868fa --- /dev/null +++ b/tools/test-js-optimizer-t3-output.js @@ -0,0 +1,49 @@ +function _png_create_write_struct_2($user_png_ver, $error_ptr, $error_fn, $warn_fn, $mem_ptr, $malloc_fn, $free_fn) { + var $png_ptr$s2; + var label; + label = 2; + var setjmpTable = { + "2": (function(value) { + label = 5; + $call1 = value; + }), + dummy: 0 + }; + while (1) try { + switch (label) { + case 2: + var $png_ptr; + var $call = _png_create_struct(1); + $png_ptr = $call; + var $call1 = (HEAP32[$png_ptr >> 2] = label, 0); + label = 5; + break; + case 5: + var $2 = $png_ptr; + if (($call1 | 0) == 0) { + label = 4; + break; + } else { + label = 3; + break; + } + case 3: + var $4 = HEAP32[($png_ptr >> 2) + (148 >> 2)]; + _png_free($2, $4); + HEAP32[($png_ptr >> 2) + (148 >> 2)] = 0; + _png_destroy_struct($png_ptr); + var $retval_0 = 0; + label = 4; + break; + case 4: + var $retval_0; + return $retval_0; + default: + assert(0, "bad label: " + label); + } + } catch (e) { + if (!e.longjmp) throw e; + setjmpTable[e.label](e.value); + } +} + |