more optimizations that v1 does and some cleanups
authorMihai Bazon <mihai@bazon.net>
Fri, 14 Sep 2012 12:36:38 +0000 (15:36 +0300)
committerMihai Bazon <mihai@bazon.net>
Fri, 14 Sep 2012 12:36:38 +0000 (15:36 +0300)
commit924aa580602a4ad94f1079dcd157286314066553
treeacd65dd576ded856e5e7cc3b15ee473539b645ac
parent93b973c99dd25aeff66ff31f2881e9ce252eaac6
more optimizations that v1 does and some cleanups

- a = a + x ==> a+=x
- joining consecutive var statements (hoisting is not always desirable)
- x == false ==> x == 0, x != true ==> x != 1
- x, x ==> x; x = exp(), x ==> x = exp()
- discarding useless break-s
bin/uglifyjs2
lib/ast.js
lib/compress.js
lib/output.js
lib/parse.js
tmp/todo