aboutsummaryrefslogtreecommitdiff
path: root/tmp
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-11 13:15:55 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-11 13:15:55 +0300
commitda407d46c65eeaf4599b0b50fc0a8ab6ba28ecdf (patch)
tree944123717fe4cb6c46aa6ecaf583a0e0a7ea421f /tmp
parent1579c0fb97bb781a624199decab92e19c77d74d6 (diff)
downloadtracifyjs-da407d46c65eeaf4599b0b50fc0a8ab6ba28ecdf.tar.gz
tracifyjs-da407d46c65eeaf4599b0b50fc0a8ab6ba28ecdf.zip
checkpoint
- discard statements with no side effects (unsafe? could be) - safer hoist_vars (needs some revamping of scope/mangling)
Diffstat (limited to 'tmp')
-rwxr-xr-xtmp/test-node.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/tmp/test-node.js b/tmp/test-node.js
index 85dc1b1a..4da5e9ff 100755
--- a/tmp/test-node.js
+++ b/tmp/test-node.js
@@ -10,5 +10,13 @@ var code = fs.readFileSync(filename, "utf8");
var ast = UglifyJS.parse(code);
ast.figure_out_scope();
+ast = ast.squeeze(UglifyJS.Compressor());
+
ast.compute_char_frequency();
-console.log(UglifyJS.base54.get().join(","));
+UglifyJS.base54.sort();
+
+ast.figure_out_scope();
+ast.mangle_names();
+
+sys.error(UglifyJS.base54.get());
+sys.print(ast.print_to_string({ beautify: true }));