checkpoint

- discard statements with no side effects (unsafe? could be)
- safer hoist_vars (needs some revamping of scope/mangling)
This commit is contained in:
Mihai Bazon
2012-09-11 13:15:55 +03:00
parent 1579c0fb97
commit da407d46c6
4 changed files with 110 additions and 31 deletions

View File

@@ -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 }));