improve `unused` (#1832)
authorAlex Lam S.L <alexlamsl@gmail.com>
Thu, 20 Apr 2017 05:06:14 +0000 (13:06 +0800)
committerGitHub <noreply@github.com>
Thu, 20 Apr 2017 05:06:14 +0000 (13:06 +0800)
commitf05d4f7af3659a481b06449584fa63e3772322e2
tree48af6da99b39bf561a29c452d97325ba7063d386
parent88e7a542cd8a8406f54c53cefe72944452f5e013
improve `unused` (#1832)

- extract leading value with side-effects out of `var` statement
- reduce scanning of `AST_Definitions` from 3 passes to just once
lib/compress.js
test/compress/collapse_vars.js
test/compress/drop-unused.js
test/compress/reduce_vars.js