diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-04-17 17:11:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-17 17:11:29 +0800 |
commit | 4ffb6fce7668a1199284e4ce8be91fdaeaf2df0e (patch) | |
tree | b3c15bc9198c44edfb7aae4a87cfa0c61e564b91 /lib/scope.js | |
parent | 71a8d0d236d29015df2d1df18de11d661d17af2e (diff) | |
download | tracifyjs-4ffb6fce7668a1199284e4ce8be91fdaeaf2df0e.tar.gz tracifyjs-4ffb6fce7668a1199284e4ce8be91fdaeaf2df0e.zip |
compress duplicated variable definitions (#1817)
These are surprisingly common, as people reuse the same variable name within loops or switch branches.
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scope.js b/lib/scope.js index 2ffca25a..c8d7c6bb 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -268,7 +268,7 @@ AST_Scope.DEFMETHOD("init_scope_vars", function(parent_scope){ AST_Lambda.DEFMETHOD("init_scope_vars", function(){ AST_Scope.prototype.init_scope_vars.apply(this, arguments); this.uses_arguments = false; - this.def_variable(new AST_SymbolVar({ + this.def_variable(new AST_SymbolConst({ name: "arguments", start: this.start, end: this.end |