handle overlapped variable definitions (#1691)
authorAlex Lam S.L <alexlamsl@gmail.com>
Sun, 26 Mar 2017 17:30:21 +0000 (01:30 +0800)
committerGitHub <noreply@github.com>
Sun, 26 Mar 2017 17:30:21 +0000 (01:30 +0800)
commit57ce5bd9e085546a5c1cb8dd4a3ea71ab6c56f26
treeee5e196f4aa4fcbe867eb82287b73b9db6b4174e
parent861a79ac9fdb2cdbb54054306eb896e2c134af73
handle overlapped variable definitions (#1691)

Process variable definitions with or without assigned values against:
- `arguments`
- named function arguments
- multiple definitions within same scope

Essentially demote variable declarations with no value assignments.

Also fixed invalid use of `AST_VarDef` over `arguments` - should use a member of `AST_SymbolDeclaration` instead.
lib/compress.js
lib/scope.js
test/compress/reduce_vars.js