diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-25 21:26:16 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-25 21:26:16 -0700 |
commit | 8057526b5b17650598f253878218254d557783e7 (patch) | |
tree | c903f342d1a3d1a2645ff58976e189f4e5c2258a | |
parent | 74fcbe26d5e006617b61c6c1022249a1181c410a (diff) |
add failing eliminator testcase
-rw-r--r-- | tools/eliminator/eliminator-test-output.js | 13 | ||||
-rw-r--r-- | tools/eliminator/eliminator-test.js | 13 |
2 files changed, 24 insertions, 2 deletions
diff --git a/tools/eliminator/eliminator-test-output.js b/tools/eliminator/eliminator-test-output.js index 69bc3632..eafdbee5 100644 --- a/tools/eliminator/eliminator-test-output.js +++ b/tools/eliminator/eliminator-test-output.js @@ -56,6 +56,17 @@ function a() { chak(); tor(HEAP[9]); } +function b() { + var $148 = _sqlite3Strlen30($147); + var $150 = HEAP32[$pExpr + 16 >> 2]; + if (($150 | 0) == 0) { + var $156 = 0; + } else { + var $156 = HEAP32[$150 >> 2]; + } + var $156; + HEAP32[$139 + ($136 << 4) + 4 >> 2] = _sqlite3FindFunction($145, $147, $148, $156, $135, 0); +} function f() { HEAP[123] = (GLOB[1] + 1) / 2; } @@ -6135,4 +6146,4 @@ function _mallocNoU($bytes) { return $mem_0; return null; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"] +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"] diff --git a/tools/eliminator/eliminator-test.js b/tools/eliminator/eliminator-test.js index 9fb9eff3..e9ac89e0 100644 --- a/tools/eliminator/eliminator-test.js +++ b/tools/eliminator/eliminator-test.js @@ -71,6 +71,17 @@ function a() { tor($$e3); // TODO: (,a,b) 'seq' } +function b() { + var $148 = _sqlite3Strlen30($147); + var $150 = HEAP32[$pExpr + 16 >> 2]; + if (($150 | 0) == 0) { + var $156 = 0; + } else { + var $156 = HEAP32[$150 >> 2]; + } + var $156; + HEAP32[$139 + ($136 << 4) + 4 >> 2] = _sqlite3FindFunction($145, $147, $148, $156, $135, 0); +} function f() { var unused; var x = GLOB[1]; @@ -8762,4 +8773,4 @@ function _mallocNoU($bytes) { return $mem_0; return null; } -// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"] +// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"] |