consolidate `evaluate` & `reduce_vars` (#1505)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sat, 25 Feb 2017 16:40:33 +0000 (00:40 +0800)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2017 16:40:33 +0000 (00:40 +0800)
commit16cd5d57a5cf7f5750104df0e5af246708fd493f
treee9ea6b8432ce0bddeeeef317f96765de1467ceeb
parent834f9f39245f1ddf5a29c579afd7ebcdb0afe585
consolidate `evaluate` & `reduce_vars` (#1505)

- improve marking efficiency
- apply smarter `const` replacement to `var`

fixes #1501
lib/compress.js
lib/scope.js
test/compress/evaluate.js
test/compress/reduce_vars.js
test/mocha/comment_before_constant.js