clean up `collapse_vars` (#1826)
authorAlex Lam S.L <alexlamsl@gmail.com>
Tue, 18 Apr 2017 13:45:34 +0000 (21:45 +0800)
committerGitHub <noreply@github.com>
Tue, 18 Apr 2017 13:45:34 +0000 (21:45 +0800)
commit0f4f01b66cb2aa4356309c70a7d6a95618603630
tree2a7abe8cdb761302cfe9d3afd3e979aaa5ce9e1e
parent5d9f1da3abc58bce95dd240bd586bedb4eb04771
clean up `collapse_vars` (#1826)

- remove overlap in functionality of singular, consecutive reference of constant value
- remove workarounds for previous bugs in `lib/scope.js`
- distribute recursive `collapse_single_use_vars()` calls to their respective `OPT(AST_Node)`
- enable collapsing of variables within a single `AST_Definitions`
lib/compress.js
test/compress/collapse_vars.js