clean up webkit quirks (#3229)

This commit is contained in:
Alex Lam S.L
2018-08-08 16:15:45 +08:00
committed by GitHub
parent 2a5277b391
commit fc78423f1d
7 changed files with 148 additions and 126 deletions

View File

@@ -320,14 +320,6 @@ function next_mangled_name(scope, options, def) {
var in_use = names_in_use(scope, options);
var holes = scope.cname_holes;
var names = Object.create(null);
// #179, #326
// in Safari strict mode, something like (function x(x){...}) is a syntax error;
// a function expression's argument cannot shadow the function expression's name
if (scope instanceof AST_Function && scope.name && def.orig[0] instanceof AST_SymbolFunarg) {
var tricky_def = scope.name.definition();
// the function's mangled_name is null when keep_fnames is true
names[tricky_def.mangled_name || tricky_def.name] = true;
}
var scopes = [ scope ];
def.references.forEach(function(sym) {
var scope = sym.scope;