tidy up various interfaces (#4066)
This commit is contained in:
@@ -3152,11 +3152,11 @@ merge(Compressor.prototype, {
|
||||
return this.expression._find_defs(compressor, "." + this.property + suffix);
|
||||
});
|
||||
def(AST_SymbolDeclaration, function(compressor) {
|
||||
if (!this.global()) return;
|
||||
if (!this.definition().global) return;
|
||||
if (HOP(compressor.option("global_defs"), this.name)) warn(this);
|
||||
});
|
||||
def(AST_SymbolRef, function(compressor, suffix) {
|
||||
if (!this.global()) return;
|
||||
if (!this.definition().global) return;
|
||||
var defines = compressor.option("global_defs");
|
||||
var name = this.name + suffix;
|
||||
if (HOP(defines, name)) return to_node(defines[name], this);
|
||||
@@ -4700,7 +4700,7 @@ merge(Compressor.prototype, {
|
||||
});
|
||||
|
||||
function log(sym, text, props) {
|
||||
AST_Node[sym.unreferenced() ? "warn" : "info"](text, props);
|
||||
AST_Node[sym.definition().references.length > 0 ? "info" : "warn"](text, props);
|
||||
}
|
||||
|
||||
function template(sym) {
|
||||
@@ -6395,7 +6395,7 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
}));
|
||||
var code = OutputStream();
|
||||
AST_BlockStatement.prototype._codegen.call(fun, fun, code);
|
||||
AST_BlockStatement.prototype._codegen.call(fun, code);
|
||||
self.args = [
|
||||
make_node(AST_String, self, {
|
||||
value: fun.argnames.map(function(arg) {
|
||||
|
||||
Reference in New Issue
Block a user