fix & improve function argument compression (#1584)
authorAlex Lam S.L <alexlamsl@gmail.com>
Thu, 9 Mar 2017 11:11:05 +0000 (19:11 +0800)
committerGitHub <noreply@github.com>
Thu, 9 Mar 2017 11:11:05 +0000 (19:11 +0800)
commitb633706ce42576b7e2aa85a96c5691bde87e71ac
tree524e6ab7980d86f0837c188cdb35fe8aa77b7487
parente9920f7ca162ce062cc481b876be293d7324a714
fix & improve function argument compression (#1584)

- one-use function call => IIFE should take `eval()` & `arguments` into account
- if unused parameter cannot be eliminated, replace it with `0`

fixes #1583
lib/compress.js
test/compress/drop-unused.js
test/compress/reduce_vars.js