aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator/eliminator-test.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-26 10:43:09 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-26 10:43:09 -0700
commit842b975052eb9bcfa2f86a6a8b9968e8ade0cede (patch)
treebdf4147b725425d9b522883e4affc53eb90b9cf1 /tools/eliminator/eliminator-test.js
parentbf584e263cddfd5a0c5a8b3a85b0f781d561492e (diff)
be careful about tracking when there is a var multiple with a call
Diffstat (limited to 'tools/eliminator/eliminator-test.js')
-rw-r--r--tools/eliminator/eliminator-test.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/eliminator/eliminator-test.js b/tools/eliminator/eliminator-test.js
index e9ac89e0..b3343f89 100644
--- a/tools/eliminator/eliminator-test.js
+++ b/tools/eliminator/eliminator-test.js
@@ -82,6 +82,19 @@ function b() {
var $156;
HEAP32[$139 + ($136 << 4) + 4 >> 2] = _sqlite3FindFunction($145, $147, $148, $156, $135, 0);
}
+function c() {
+ var x = MEM[100], y = callMe(5), z = glob; // do not eliminate vars with multiple variables, if there is a call!
+ var w = x*2;
+ zoom(z);
+ hail(w);
+ sunk(y);
+ barrier();
+ var x2 = MEM[100], y2 = $callMe2, z2 = glob; // no call, so ok
+ var w2 = x2*2;
+ zoom(z2);
+ hail(w2);
+ sunk(y2);
+}
function f() {
var unused;
var x = GLOB[1];
@@ -8773,4 +8786,4 @@ function _mallocNoU($bytes) {
return $mem_0;
return null;
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"]
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"]