diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 18:42:28 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 18:42:28 -0800 |
commit | 508d4f02413a6f3d1924c17e410882081ba67615 (patch) | |
tree | 006f024f28455c7b54873e8862ed933af5562497 /tools/eliminator | |
parent | 5f00b61350b9236c36e81dafd5e8e3a9c93b347e (diff) |
make eliminator not get confused by calls without a return but with a coercion
Diffstat (limited to 'tools/eliminator')
-rw-r--r-- | tools/eliminator/asm-eliminator-test-output.js | 5 | ||||
-rw-r--r-- | tools/eliminator/asm-eliminator-test.js | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js index c71063cb..a344fc35 100644 --- a/tools/eliminator/asm-eliminator-test-output.js +++ b/tools/eliminator/asm-eliminator-test-output.js @@ -299,4 +299,9 @@ function select2($foundBase_0_off0) { STACKTOP = sp; return ($foundBase_0_off0 ? 0 : $call24) | 0; } +function binary(x) { + x = x | 0; + memset(f(x)) | 0; + +dmemset(f(x)); +} diff --git a/tools/eliminator/asm-eliminator-test.js b/tools/eliminator/asm-eliminator-test.js index 7ec277d5..4b45e4d4 100644 --- a/tools/eliminator/asm-eliminator-test.js +++ b/tools/eliminator/asm-eliminator-test.js @@ -370,5 +370,13 @@ function select2($foundBase_0_off0) { STACKTOP = sp; return $retval_0 | 0; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["asm", "__Z11printResultPiS_j", "_segment_holding", "__ZN5identC2EiPKcPci", "_vec2Length", "exc", "label", "confuusion", "tempDouble", "_org_apache_harmony_luni_util_NumberConverter_freeFormat__", "__ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_", "_java_nio_charset_Charset_forNameInternal___java_lang_String", "looop2", "looop3", "looop4", "looop5", "looop6", "looop7", "looop8", "multiloop", "multiloop2", "tempDouble2", "watIf", "select2"] +function binary(x) { + x = x | 0; + var y = 0, z = 0; + y = f(x); + memset(y) | 0; + z = f(x); + +dmemset(z); +} +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["asm", "__Z11printResultPiS_j", "_segment_holding", "__ZN5identC2EiPKcPci", "_vec2Length", "exc", "label", "confuusion", "tempDouble", "_org_apache_harmony_luni_util_NumberConverter_freeFormat__", "__ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_", "_java_nio_charset_Charset_forNameInternal___java_lang_String", "looop2", "looop3", "looop4", "looop5", "looop6", "looop7", "looop8", "multiloop", "multiloop2", "tempDouble2", "watIf", "select2", "binary"] |