aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-08 16:01:27 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-08 16:04:05 -0800
commitb873dc778f52461129b1e28fb12dd3d4a309851c (patch)
treee82913bc549a83104ce8abfb518eca6cb6d8aa83 /tools
parent140ea9e81feb09d8f2559995c73d49a39424ef5d (diff)
parente0268fa1035a718341c53921eee9318d4a8033cd (diff)
Merge branch 'incoming' into f32
Conflicts: src/parseTools.js src/preamble.js
Diffstat (limited to 'tools')
-rw-r--r--tools/eliminator/asm-eliminator-test-output.js7
-rw-r--r--tools/eliminator/asm-eliminator-test.js10
-rw-r--r--tools/js-optimizer.js4
-rw-r--r--tools/shared.py2
4 files changed, 21 insertions, 2 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"]
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index 022bdf47..36244298 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -2485,6 +2485,10 @@ function eliminate(ast, memSafe) {
} else if (type === 'return') {
if (node[1]) traverseInOrder(node[1]);
} else if (type === 'conditional') {
+ if (!callsInvalidated) { // invalidate calls, since we cannot eliminate them into a branch of an LLVM select/JS conditional that does not execute
+ invalidateCalls();
+ callsInvalidated = true;
+ }
traverseInOrder(node[1]);
traverseInOrder(node[2]);
traverseInOrder(node[3]);
diff --git a/tools/shared.py b/tools/shared.py
index 252e3844..edbe8701 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -314,7 +314,7 @@ def find_temp_directory():
# we re-check sanity when the settings are changed)
# We also re-check sanity and clear the cache when the version changes
-EMSCRIPTEN_VERSION = '1.7.1'
+EMSCRIPTEN_VERSION = '1.7.2'
def generate_sanity():
return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT