aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-08 14:54:18 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-08 14:54:18 -0800
commitc715cec68f4c965ca443669fcf48eecfa70b52d8 (patch)
tree61203a49205021e1525655deb9a32074d00fa0bc /tools/eliminator
parent7f870cf9c357f6a1138ba612ace7d7249f85e250 (diff)
invalidate calls on conditionals in js optimizer, to avoid eliminating into a non-executing code path
Diffstat (limited to 'tools/eliminator')
-rw-r--r--tools/eliminator/asm-eliminator-test-output.js7
-rw-r--r--tools/eliminator/asm-eliminator-test.js10
2 files changed, 16 insertions, 1 deletions
diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js
index dda82047..434fbaf9 100644
--- a/tools/eliminator/asm-eliminator-test-output.js
+++ b/tools/eliminator/asm-eliminator-test-output.js
@@ -291,4 +291,11 @@ function watIf() {
if ($cmp38) {} else {}
}
}
+function select2($foundBase_0_off0) {
+ $foundBase_0_off0 = $foundBase_0_off0 | 0;
+ var $call24 = 0;
+ $call24 = MUST_RUN() | 0;
+ STACKTOP = sp;
+ return ($foundBase_0_off0 ? 0 : $call24) | 0;
+}
diff --git a/tools/eliminator/asm-eliminator-test.js b/tools/eliminator/asm-eliminator-test.js
index 6f426150..7ec277d5 100644
--- a/tools/eliminator/asm-eliminator-test.js
+++ b/tools/eliminator/asm-eliminator-test.js
@@ -362,5 +362,13 @@ function watIf() {
}
}
}
-// 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"]
+function select2($foundBase_0_off0) {
+ $foundBase_0_off0 = $foundBase_0_off0 | 0;
+ var $call24 = 0, $retval_0 = 0;
+ $call24 = MUST_RUN() | 0;
+ $retval_0 = $foundBase_0_off0 ? 0 : $call24;
+ 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"]