consolidate & enhance unused (#2439)

- defer declaration removal in `collapse_vars`
- account for `AST_SymbolFunarg` in deduplication
- private accounting for `collapse_vars`
- avoid issues with identity reference due to deep cloning

fixes #2437
This commit is contained in:
Alex Lam S.L
2017-11-06 14:25:10 +08:00
committed by GitHub
parent 2c2fd89e34
commit 6c45101870
4 changed files with 145 additions and 76 deletions

View File

@@ -51,6 +51,7 @@ this_binding_collapse_vars: {
options = {
collapse_vars: true,
toplevel: true,
unused: true,
};
input: {
var c = a; c();