aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-26 17:30:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-26 17:30:48 -0700
commit936166440905ddd044f97e4d4decf3a375b54dc0 (patch)
tree26eddd2753093512d75155870168e1cc1efa3323
parent3ed62c97c672038a543ce7e41f94443920473c3d (diff)
remove unGlobalize tests and update others
-rwxr-xr-xtests/runner.py2
-rw-r--r--tools/eliminator/eliminator-test-output.js1
-rw-r--r--tools/test-js-optimizer-output.js36
-rw-r--r--tools/test-js-optimizer-regs-output.js1
-rw-r--r--tools/test-js-optimizer-t2-output.js1
-rw-r--r--tools/test-js-optimizer-t2c-output.js1
-rw-r--r--tools/test-js-optimizer-t3.js1
-rw-r--r--tools/test-js-optimizer.js37
8 files changed, 7 insertions, 73 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 880e29a0..108466e4 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -7866,7 +7866,7 @@ f.close()
def test_js_optimizer(self):
for input, expected, passes in [
(path_from_root('tools', 'test-js-optimizer.js'), open(path_from_root('tools', 'test-js-optimizer-output.js')).read(),
- ['hoistMultiples', 'loopOptimizer', 'unGlobalize', 'removeAssignsToUndefined', 'simplifyExpressionsPre', 'simplifyExpressionsPost']),
+ ['hoistMultiples', 'loopOptimizer', 'removeAssignsToUndefined', 'simplifyExpressionsPre', 'simplifyExpressionsPost']),
(path_from_root('tools', 'test-js-optimizer-t2c.js'), open(path_from_root('tools', 'test-js-optimizer-t2c-output.js')).read(),
['simplifyExpressionsPre', 'optimizeShiftsConservative']),
(path_from_root('tools', 'test-js-optimizer-t2.js'), open(path_from_root('tools', 'test-js-optimizer-t2-output.js')).read(),
diff --git a/tools/eliminator/eliminator-test-output.js b/tools/eliminator/eliminator-test-output.js
index 0d9c1be2..84c53033 100644
--- a/tools/eliminator/eliminator-test-output.js
+++ b/tools/eliminator/eliminator-test-output.js
@@ -6159,3 +6159,4 @@ function _mallocNoU($bytes) {
return null;
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU"]
+
diff --git a/tools/test-js-optimizer-output.js b/tools/test-js-optimizer-output.js
index a312296d..b9465d73 100644
--- a/tools/test-js-optimizer-output.js
+++ b/tools/test-js-optimizer-output.js
@@ -1,38 +1,3 @@
-var c;
-var b = 5;
-var s3 = !0;
-var block = [ void 0 ];
-function abc() {
- var cheez = [ void 0 ];
- var fleefl;
- cheez = 10;
- var waka, flake, marfoosh;
- var waka2 = 5, flake2, marfoosh2;
- var waka3, flake3 = 5, marfoosh3;
- var waka4, flake4, marfoosh4 = 5;
- var test1 = !0, test2 = !1, test3 = null, test4 = z, test5 = b, test6;
- s3 = 9;
-}
-function xyz() {
- var x = 52;
- var cheez = x;
- var t = 22;
- function inner1(c) {
- var i = x, j = null, k = 5, l = t, m = s2;
- var s2 = 8;
- }
- var inner2 = (function(d) {
- var i = x, j = null, k = 5, l = t, m = s2;
- var s2 = 8;
- });
- var patama = s3;
-}
-function xyz2(x) {
- var cheez = x;
-}
-zzz = (function(nada) {
- var cheez;
-});
function expr() {
if ($0 >= $1) print("hi");
}
@@ -315,3 +280,4 @@ function tricky() {
var $conv642 = $conv6374 - (($132 << 16 >> 16 | 0) / 2 & -1) & 65535;
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["abc", "xyz", "xyz2", "expr", "loopy", "bits", "maths", "hoisting", "demangle", "lua", "moreLabels", "notComps", "tricky"]
+
diff --git a/tools/test-js-optimizer-regs-output.js b/tools/test-js-optimizer-regs-output.js
index a5e97f46..2f91f52b 100644
--- a/tools/test-js-optimizer-regs-output.js
+++ b/tools/test-js-optimizer-regs-output.js
@@ -226,3 +226,4 @@ function switchey(x) {
pp(r8);
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["test", "primes", "atomic", "fcntl_open", "ex", "switchey"]
+
diff --git a/tools/test-js-optimizer-t2-output.js b/tools/test-js-optimizer-t2-output.js
index 9b22905d..62cd6e0d 100644
--- a/tools/test-js-optimizer-t2-output.js
+++ b/tools/test-js-optimizer-t2-output.js
@@ -89,3 +89,4 @@ function shifty($id2) {
q(go() + 2 >> 2);
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"]
+
diff --git a/tools/test-js-optimizer-t2c-output.js b/tools/test-js-optimizer-t2c-output.js
index e0f95fcc..f41bb815 100644
--- a/tools/test-js-optimizer-t2c-output.js
+++ b/tools/test-js-optimizer-t2c-output.js
@@ -15,3 +15,4 @@ function shifty() {
q(h() >> 2 << 2);
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["shifty"]
+
diff --git a/tools/test-js-optimizer-t3.js b/tools/test-js-optimizer-t3.js
index beef1f39..489f0329 100644
--- a/tools/test-js-optimizer-t3.js
+++ b/tools/test-js-optimizer-t3.js
@@ -47,3 +47,4 @@ function _png_create_write_struct_2($user_png_ver, $error_ptr, $error_fn, $warn_
}
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["_png_create_write_struct_2"]
+
diff --git a/tools/test-js-optimizer.js b/tools/test-js-optimizer.js
index e9d973dd..7707b1dc 100644
--- a/tools/test-js-optimizer.js
+++ b/tools/test-js-optimizer.js
@@ -1,40 +1,3 @@
-var c;
-var b = 5, x = void 0, y = null, t = !0;
-var s = !1, s2 = !1, s3 = !0;
-var block = [x];
-function abc() {
- var cheez = [x];
- var fleefl;
- cheez = 10;
- fleefl = x;
- fleefl = cheez = x;
- var waka = x, flake = x, marfoosh = x;
- var waka2 = 5, flake2 = x, marfoosh2 = x;
- var waka3 = x, flake3 = 5, marfoosh3 = x;
- var waka4 = x, flake4 = x, marfoosh4 = 5;
- var test1 = t, test2 = s, test3 = y, test4 = z, test5 = b, test6 = x;
- s3 = 9;
-}
-function xyz() {
- var x = 52;
- var cheez = x;
- var t = 22;
- function inner1(c) {
- var i = x, j = y, k = 5, l = t, m = s2;
- var s2 = 8;
- }
- var inner2 = function(d) {
- var i = x, j = y, k = 5, l = t, m = s2;
- var s2 = 8;
- };
- var patama = s3;
-}
-function xyz2(x) {
- var cheez = x;
-}
-zzz = function(nada) {
- var cheez = x;
-};
function expr() {
if (!($0 < $1)) print("hi");
}