Merge branch 'master' into harmony
This commit is contained in:
234
lib/compress.js
234
lib/compress.js
@@ -156,7 +156,9 @@ merge(Compressor.prototype, {
|
|||||||
}
|
}
|
||||||
var passes = +this.options.passes || 1;
|
var passes = +this.options.passes || 1;
|
||||||
var last_count = 1 / 0;
|
var last_count = 1 / 0;
|
||||||
|
var mangle = { ie8: this.option("ie8") };
|
||||||
for (var pass = 0; pass < passes; pass++) {
|
for (var pass = 0; pass < passes; pass++) {
|
||||||
|
node.figure_out_scope(mangle);
|
||||||
if (pass > 0 || this.option("reduce_vars"))
|
if (pass > 0 || this.option("reduce_vars"))
|
||||||
node.reset_opt_flags(this);
|
node.reset_opt_flags(this);
|
||||||
node = node.transform(this);
|
node = node.transform(this);
|
||||||
@@ -322,7 +324,7 @@ merge(Compressor.prototype, {
|
|||||||
d.fixed = false;
|
d.fixed = false;
|
||||||
} else if (d.fixed) {
|
} else if (d.fixed) {
|
||||||
var value = node.fixed_value();
|
var value = node.fixed_value();
|
||||||
if (unused && !compressor.exposed(d) && value && d.references.length == 1) {
|
if (value && ref_once(d) && !compressor.exposed(d)) {
|
||||||
if (value instanceof AST_Lambda) {
|
if (value instanceof AST_Lambda) {
|
||||||
d.single_use = d.scope === node.scope
|
d.single_use = d.scope === node.scope
|
||||||
&& !(d.orig[0] instanceof AST_SymbolFunarg)
|
&& !(d.orig[0] instanceof AST_SymbolFunarg)
|
||||||
@@ -396,7 +398,7 @@ merge(Compressor.prototype, {
|
|||||||
} else {
|
} else {
|
||||||
d.fixed = node;
|
d.fixed = node;
|
||||||
mark(d, true);
|
mark(d, true);
|
||||||
if (unused && d.references.length == 1) {
|
if (ref_once(d)) {
|
||||||
d.single_use = d.scope === d.references[0].scope
|
d.single_use = d.scope === d.references[0].scope
|
||||||
|| node.is_constant_expression(d.references[0].scope);
|
|| node.is_constant_expression(d.references[0].scope);
|
||||||
}
|
}
|
||||||
@@ -578,7 +580,7 @@ merge(Compressor.prototype, {
|
|||||||
function reset_def(def) {
|
function reset_def(def) {
|
||||||
def.direct_access = false;
|
def.direct_access = false;
|
||||||
def.escaped = false;
|
def.escaped = false;
|
||||||
if (def.scope.uses_eval) {
|
if (def.scope.uses_eval || def.scope.uses_with) {
|
||||||
def.fixed = false;
|
def.fixed = false;
|
||||||
} else if (def.orig[0] instanceof AST_SymbolConst || !compressor.exposed(def)) {
|
} else if (def.orig[0] instanceof AST_SymbolConst || !compressor.exposed(def)) {
|
||||||
def.fixed = undefined;
|
def.fixed = undefined;
|
||||||
@@ -590,6 +592,10 @@ merge(Compressor.prototype, {
|
|||||||
def.single_use = undefined;
|
def.single_use = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ref_once(def) {
|
||||||
|
return unused && !def.scope.uses_eval && !def.scope.uses_with && def.references.length == 1;
|
||||||
|
}
|
||||||
|
|
||||||
function is_immutable(value) {
|
function is_immutable(value) {
|
||||||
if (!value) return false;
|
if (!value) return false;
|
||||||
return value.is_constant()
|
return value.is_constant()
|
||||||
@@ -829,6 +835,14 @@ merge(Compressor.prototype, {
|
|||||||
|| compressor.option("unsafe") && global_names(this.name);
|
|| compressor.option("unsafe") && global_names(this.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function drop_decl(def) {
|
||||||
|
def._eliminiated = (def._eliminiated || 0) + 1;
|
||||||
|
if (def.orig.length == def._eliminiated) {
|
||||||
|
def.scope.functions.del(def.name);
|
||||||
|
def.scope.variables.del(def.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function tighten_body(statements, compressor) {
|
function tighten_body(statements, compressor) {
|
||||||
var CHANGED, max_iter = 10;
|
var CHANGED, max_iter = 10;
|
||||||
do {
|
do {
|
||||||
@@ -1070,7 +1084,8 @@ merge(Compressor.prototype, {
|
|||||||
function get_lhs(expr) {
|
function get_lhs(expr) {
|
||||||
if (expr instanceof AST_VarDef && expr.name instanceof AST_SymbolDeclaration) {
|
if (expr instanceof AST_VarDef && expr.name instanceof AST_SymbolDeclaration) {
|
||||||
var def = expr.name.definition();
|
var def = expr.name.definition();
|
||||||
if (def.orig.length > 1 && !(expr.name instanceof AST_SymbolFunarg)
|
if (def.orig.length - (def._eliminiated || 0) > 1
|
||||||
|
&& !(expr.name instanceof AST_SymbolFunarg)
|
||||||
|| def.references.length == 1 && !compressor.exposed(def)) {
|
|| def.references.length == 1 && !compressor.exposed(def)) {
|
||||||
return make_node(AST_SymbolRef, expr.name, expr.name);
|
return make_node(AST_SymbolRef, expr.name, expr.name);
|
||||||
}
|
}
|
||||||
@@ -1080,6 +1095,10 @@ merge(Compressor.prototype, {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_rvalue(expr) {
|
||||||
|
return expr[expr instanceof AST_Assign ? "right" : "value"];
|
||||||
|
}
|
||||||
|
|
||||||
function get_lvalues(expr) {
|
function get_lvalues(expr) {
|
||||||
var lvalues = Object.create(null);
|
var lvalues = Object.create(null);
|
||||||
if (expr instanceof AST_Unary) return lvalues;
|
if (expr instanceof AST_Unary) return lvalues;
|
||||||
@@ -1090,7 +1109,7 @@ merge(Compressor.prototype, {
|
|||||||
lvalues[sym.name] = lvalues[sym.name] || is_lhs(node, tw.parent());
|
lvalues[sym.name] = lvalues[sym.name] || is_lhs(node, tw.parent());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
expr[expr instanceof AST_Assign ? "right" : "value"].walk(tw);
|
get_rvalue(expr).walk(tw);
|
||||||
return lvalues;
|
return lvalues;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1119,7 +1138,9 @@ merge(Compressor.prototype, {
|
|||||||
if (node === expr) {
|
if (node === expr) {
|
||||||
found = true;
|
found = true;
|
||||||
if (node instanceof AST_VarDef) {
|
if (node instanceof AST_VarDef) {
|
||||||
remove(node.name.definition().orig, node.name);
|
drop_decl(node.name.definition());
|
||||||
|
node.value = null;
|
||||||
|
return node;
|
||||||
}
|
}
|
||||||
return in_list ? MAP.skip : null;
|
return in_list ? MAP.skip : null;
|
||||||
}
|
}
|
||||||
@@ -1128,16 +1149,13 @@ merge(Compressor.prototype, {
|
|||||||
case 0: return null;
|
case 0: return null;
|
||||||
case 1: return node.expressions[0];
|
case 1: return node.expressions[0];
|
||||||
}
|
}
|
||||||
if (node instanceof AST_Definitions && node.definitions.length == 0
|
if (node instanceof AST_SimpleStatement && !node.body) return null;
|
||||||
|| node instanceof AST_SimpleStatement && !node.body) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
function value_has_side_effects(expr) {
|
function value_has_side_effects(expr) {
|
||||||
if (expr instanceof AST_Unary) return false;
|
if (expr instanceof AST_Unary) return false;
|
||||||
return expr[expr instanceof AST_Assign ? "right" : "value"].has_side_effects(compressor);
|
return get_rvalue(expr).has_side_effects(compressor);
|
||||||
}
|
}
|
||||||
|
|
||||||
function references_in_scope(def) {
|
function references_in_scope(def) {
|
||||||
@@ -2390,7 +2408,7 @@ merge(Compressor.prototype, {
|
|||||||
|| can_be_evicted_from_block(self.body[0])) {
|
|| can_be_evicted_from_block(self.body[0])) {
|
||||||
return self.body[0];
|
return self.body[0];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0: return make_node(AST_EmptyStatement, self);
|
case 0: return make_node(AST_EmptyStatement, self);
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
@@ -2426,78 +2444,80 @@ merge(Compressor.prototype, {
|
|||||||
// this scope (not in nested scopes).
|
// this scope (not in nested scopes).
|
||||||
var scope = this;
|
var scope = this;
|
||||||
var tw = new TreeWalker(function(node, descend){
|
var tw = new TreeWalker(function(node, descend){
|
||||||
if (node !== self) {
|
if (node === self) return;
|
||||||
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
|
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
|
||||||
var in_export = tw.parent() instanceof AST_Export;
|
var in_export = tw.parent() instanceof AST_Export;
|
||||||
if (in_export || !drop_funcs && scope === self) {
|
if (in_export || !drop_funcs && scope === self) {
|
||||||
var node_def = node.name.definition();
|
var node_def = node.name.definition();
|
||||||
if (node_def.global && !(node_def.id in in_use_ids)) {
|
if (node_def.global && !(node_def.id in in_use_ids)) {
|
||||||
in_use_ids[node_def.id] = true;
|
|
||||||
in_use.push(node_def);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
initializations.add(node.name.name, node);
|
|
||||||
return true; // don't go in nested scopes
|
|
||||||
}
|
|
||||||
if (node instanceof AST_Definitions && scope === self) {
|
|
||||||
var in_export = tw.parent() instanceof AST_Export;
|
|
||||||
node.definitions.forEach(function(def){
|
|
||||||
if (def.name instanceof AST_SymbolVar) {
|
|
||||||
var_defs_by_id.add(def.name.definition().id, def);
|
|
||||||
}
|
|
||||||
if (in_export || !drop_vars) {
|
|
||||||
def.name.walk(new TreeWalker(function(node) {
|
|
||||||
if (node instanceof AST_SymbolDeclaration) {
|
|
||||||
var def = node.definition();
|
|
||||||
if ((in_export || def.global) && !(def.id in in_use_ids)) {
|
|
||||||
in_use_ids[def.id] = true;
|
|
||||||
in_use.push(def);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
if (def.value) {
|
|
||||||
if (def.name instanceof AST_Destructuring) {
|
|
||||||
var destructuring_cache = destructuring_value;
|
|
||||||
destructuring_value = def.value;
|
|
||||||
def.walk(tw);
|
|
||||||
destructuring_value = destructuring_cache;
|
|
||||||
} else {
|
|
||||||
initializations.add(def.name.name, def.value);
|
|
||||||
}
|
|
||||||
if (def.value.has_side_effects(compressor)) {
|
|
||||||
def.value.walk(tw);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
var sym;
|
|
||||||
if (scope === self
|
|
||||||
&& (sym = assign_as_unused(node)) instanceof AST_SymbolRef
|
|
||||||
&& !is_ref_of(node.left, AST_SymbolBlockDeclaration)
|
|
||||||
&& self.variables.get(sym.name) === sym.definition()) {
|
|
||||||
if (node instanceof AST_Assign) node.right.walk(tw);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (node instanceof AST_SymbolRef) {
|
|
||||||
var node_def = node.definition();
|
|
||||||
if (!(node_def.id in in_use_ids)) {
|
|
||||||
in_use_ids[node_def.id] = true;
|
in_use_ids[node_def.id] = true;
|
||||||
in_use.push(node_def);
|
in_use.push(node_def);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if (node instanceof AST_Scope) {
|
initializations.add(node.name.name, node);
|
||||||
var save_scope = scope;
|
return true; // don't go in nested scopes
|
||||||
scope = node;
|
}
|
||||||
descend();
|
if (node instanceof AST_SymbolFunarg && scope === self) {
|
||||||
scope = save_scope;
|
var_defs_by_id.add(node.definition().id, node);
|
||||||
return true;
|
}
|
||||||
}
|
if (node instanceof AST_Definitions && scope === self) {
|
||||||
if (node.destructuring && destructuring_value) {
|
var in_export = tw.parent() instanceof AST_Export;
|
||||||
initializations.add(node.name, destructuring_value);
|
node.definitions.forEach(function(def){
|
||||||
|
if (def.name instanceof AST_SymbolVar) {
|
||||||
|
var_defs_by_id.add(def.name.definition().id, def);
|
||||||
|
}
|
||||||
|
if (in_export || !drop_vars) {
|
||||||
|
def.name.walk(new TreeWalker(function(node) {
|
||||||
|
if (node instanceof AST_SymbolDeclaration) {
|
||||||
|
var def = node.definition();
|
||||||
|
if ((in_export || def.global) && !(def.id in in_use_ids)) {
|
||||||
|
in_use_ids[def.id] = true;
|
||||||
|
in_use.push(def);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
if (def.value) {
|
||||||
|
if (def.name instanceof AST_Destructuring) {
|
||||||
|
var destructuring_cache = destructuring_value;
|
||||||
|
destructuring_value = def.value;
|
||||||
|
def.walk(tw);
|
||||||
|
destructuring_value = destructuring_cache;
|
||||||
|
} else {
|
||||||
|
initializations.add(def.name.name, def.value);
|
||||||
|
}
|
||||||
|
if (def.value.has_side_effects(compressor)) {
|
||||||
|
def.value.walk(tw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var sym;
|
||||||
|
if (scope === self
|
||||||
|
&& (sym = assign_as_unused(node)) instanceof AST_SymbolRef
|
||||||
|
&& !is_ref_of(node.left, AST_SymbolBlockDeclaration)
|
||||||
|
&& self.variables.get(sym.name) === sym.definition()) {
|
||||||
|
if (node instanceof AST_Assign) node.right.walk(tw);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (node instanceof AST_SymbolRef) {
|
||||||
|
var node_def = node.definition();
|
||||||
|
if (!(node_def.id in in_use_ids)) {
|
||||||
|
in_use_ids[node_def.id] = true;
|
||||||
|
in_use.push(node_def);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (node instanceof AST_Scope) {
|
||||||
|
var save_scope = scope;
|
||||||
|
scope = node;
|
||||||
|
descend();
|
||||||
|
scope = save_scope;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (node.destructuring && destructuring_value) {
|
||||||
|
initializations.add(node.name, destructuring_value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
self.walk(tw);
|
self.walk(tw);
|
||||||
@@ -2566,7 +2586,7 @@ merge(Compressor.prototype, {
|
|||||||
var keep = (def.id in in_use_ids) || !drop_funcs && def.global;
|
var keep = (def.id in in_use_ids) || !drop_funcs && def.global;
|
||||||
if (!keep) {
|
if (!keep) {
|
||||||
compressor[node.name.unreferenced() ? "warn" : "info"]("Dropping unused function {name} [{file}:{line},{col}]", template(node.name));
|
compressor[node.name.unreferenced() ? "warn" : "info"]("Dropping unused function {name} [{file}:{line},{col}]", template(node.name));
|
||||||
drop_decl(def, node.name);
|
drop_decl(def);
|
||||||
return make_node(AST_EmptyStatement, node);
|
return make_node(AST_EmptyStatement, node);
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
@@ -2591,7 +2611,7 @@ merge(Compressor.prototype, {
|
|||||||
if (var_defs.length > 1 && !def.value) {
|
if (var_defs.length > 1 && !def.value) {
|
||||||
compressor.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]", template(def.name));
|
compressor.warn("Dropping duplicated definition of variable {name} [{file}:{line},{col}]", template(def.name));
|
||||||
remove(var_defs, def);
|
remove(var_defs, def);
|
||||||
drop_decl(sym, def.name);
|
drop_decl(sym);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2624,7 +2644,7 @@ merge(Compressor.prototype, {
|
|||||||
} else {
|
} else {
|
||||||
compressor[def.name.unreferenced() ? "warn" : "info"]("Dropping unused variable {name} [{file}:{line},{col}]", template(def.name));
|
compressor[def.name.unreferenced() ? "warn" : "info"]("Dropping unused variable {name} [{file}:{line},{col}]", template(def.name));
|
||||||
}
|
}
|
||||||
drop_decl(sym, def.name);
|
drop_decl(sym);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (head.length == 0 && tail.length == 1 && tail[0].name instanceof AST_SymbolVar) {
|
if (head.length == 0 && tail.length == 1 && tail[0].name instanceof AST_SymbolVar) {
|
||||||
@@ -2633,7 +2653,7 @@ merge(Compressor.prototype, {
|
|||||||
var def = tail.pop();
|
var def = tail.pop();
|
||||||
compressor.warn("Converting duplicated definition of variable {name} to assignment [{file}:{line},{col}]", template(def.name));
|
compressor.warn("Converting duplicated definition of variable {name} to assignment [{file}:{line},{col}]", template(def.name));
|
||||||
remove(var_defs, def);
|
remove(var_defs, def);
|
||||||
drop_decl(def.name.definition(), def.name);
|
drop_decl(def.name.definition());
|
||||||
side_effects.unshift(make_node(AST_Assign, def, {
|
side_effects.unshift(make_node(AST_Assign, def, {
|
||||||
operator: "=",
|
operator: "=",
|
||||||
left: make_node(AST_SymbolRef, def.name, def.name),
|
left: make_node(AST_SymbolRef, def.name, def.name),
|
||||||
@@ -2722,14 +2742,6 @@ merge(Compressor.prototype, {
|
|||||||
col : sym.start.col
|
col : sym.start.col
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function drop_decl(def, decl) {
|
|
||||||
remove(def.orig, decl);
|
|
||||||
if (!def.orig.length) {
|
|
||||||
def.scope.functions.del(def.name);
|
|
||||||
def.scope.variables.del(def.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
self.transform(tt);
|
self.transform(tt);
|
||||||
@@ -3489,7 +3501,7 @@ merge(Compressor.prototype, {
|
|||||||
});
|
});
|
||||||
a.push(var_);
|
a.push(var_);
|
||||||
}
|
}
|
||||||
remove(def.name.definition().orig, def.name);
|
drop_decl(def.name.definition());
|
||||||
return a;
|
return a;
|
||||||
}, []);
|
}, []);
|
||||||
if (assignments.length == 0) return null;
|
if (assignments.length == 0) return null;
|
||||||
@@ -3772,6 +3784,7 @@ merge(Compressor.prototype, {
|
|||||||
&& !exp.uses_arguments
|
&& !exp.uses_arguments
|
||||||
&& !exp.uses_eval
|
&& !exp.uses_eval
|
||||||
&& (exp.body instanceof AST_Node || exp.body.length == 1)
|
&& (exp.body instanceof AST_Node || exp.body.length == 1)
|
||||||
|
&& !exp.contains_this()
|
||||||
&& all(exp.argnames, function(arg) {
|
&& all(exp.argnames, function(arg) {
|
||||||
if (arg instanceof AST_Expansion) return arg.expression.__unused;
|
if (arg instanceof AST_Expansion) return arg.expression.__unused;
|
||||||
return arg.__unused;
|
return arg.__unused;
|
||||||
@@ -3786,23 +3799,6 @@ merge(Compressor.prototype, {
|
|||||||
expression: stat.body
|
expression: stat.body
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (value) {
|
|
||||||
var tw = new TreeWalker(function(node) {
|
|
||||||
if (!value) return true;
|
|
||||||
if (node instanceof AST_SymbolRef) {
|
|
||||||
var ref = node.scope.find_variable(node);
|
|
||||||
if (ref && ref.scope.parent_scope === fn.parent_scope) {
|
|
||||||
value = null;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (node instanceof AST_This && !tw.find_parent(AST_Scope)) {
|
|
||||||
value = null;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
value.walk(tw);
|
|
||||||
}
|
|
||||||
if (value) {
|
if (value) {
|
||||||
var args = self.args.concat(value);
|
var args = self.args.concat(value);
|
||||||
return make_sequence(self, args).optimize(compressor);
|
return make_sequence(self, args).optimize(compressor);
|
||||||
@@ -4498,12 +4494,20 @@ merge(Compressor.prototype, {
|
|||||||
if (fixed instanceof AST_Defun) {
|
if (fixed instanceof AST_Defun) {
|
||||||
d.fixed = fixed = make_node(AST_Function, fixed, fixed);
|
d.fixed = fixed = make_node(AST_Function, fixed, fixed);
|
||||||
}
|
}
|
||||||
if (compressor.option("unused")
|
if (fixed && d.single_use) {
|
||||||
&& fixed
|
var recurse;
|
||||||
&& d.references.length == 1
|
if (fixed instanceof AST_Function) {
|
||||||
&& d.single_use) {
|
for (var i = 0; recurse = compressor.parent(i); i++) {
|
||||||
var value = fixed.optimize(compressor);
|
if (recurse instanceof AST_Lambda) {
|
||||||
return value === fixed ? fixed.clone(true) : value;
|
var name = recurse.name;
|
||||||
|
if (name && name.definition() === d) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!recurse) {
|
||||||
|
var value = fixed.optimize(compressor);
|
||||||
|
return value === fixed ? fixed.clone(true) : value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (fixed && d.should_replace === undefined) {
|
if (fixed && d.should_replace === undefined) {
|
||||||
var init;
|
var init;
|
||||||
|
|||||||
@@ -141,11 +141,9 @@ function minify(files, options) {
|
|||||||
if (options.wrap) {
|
if (options.wrap) {
|
||||||
toplevel = toplevel.wrap_commonjs(options.wrap);
|
toplevel = toplevel.wrap_commonjs(options.wrap);
|
||||||
}
|
}
|
||||||
if (timings) timings.scope1 = Date.now();
|
|
||||||
if (options.compress) toplevel.figure_out_scope(options.mangle);
|
|
||||||
if (timings) timings.compress = Date.now();
|
if (timings) timings.compress = Date.now();
|
||||||
if (options.compress) toplevel = new Compressor(options.compress).compress(toplevel);
|
if (options.compress) toplevel = new Compressor(options.compress).compress(toplevel);
|
||||||
if (timings) timings.scope2 = Date.now();
|
if (timings) timings.scope = Date.now();
|
||||||
if (options.mangle) toplevel.figure_out_scope(options.mangle);
|
if (options.mangle) toplevel.figure_out_scope(options.mangle);
|
||||||
if (timings) timings.mangle = Date.now();
|
if (timings) timings.mangle = Date.now();
|
||||||
if (options.mangle) {
|
if (options.mangle) {
|
||||||
@@ -203,9 +201,9 @@ function minify(files, options) {
|
|||||||
if (timings) {
|
if (timings) {
|
||||||
timings.end = Date.now();
|
timings.end = Date.now();
|
||||||
result.timings = {
|
result.timings = {
|
||||||
parse: 1e-3 * (timings.scope1 - timings.parse),
|
parse: 1e-3 * (timings.compress - timings.parse),
|
||||||
scope: 1e-3 * (timings.compress - timings.scope1 + timings.mangle - timings.scope2),
|
compress: 1e-3 * (timings.scope - timings.compress),
|
||||||
compress: 1e-3 * (timings.scope2 - timings.compress),
|
scope: 1e-3 * (timings.mangle - timings.scope),
|
||||||
mangle: 1e-3 * (timings.properties - timings.mangle),
|
mangle: 1e-3 * (timings.properties - timings.mangle),
|
||||||
properties: 1e-3 * (timings.output - timings.properties),
|
properties: 1e-3 * (timings.output - timings.properties),
|
||||||
output: 1e-3 * (timings.end - timings.output),
|
output: 1e-3 * (timings.end - timings.output),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"homepage": "https://github.com/mishoo/UglifyJS2/tree/harmony",
|
"homepage": "https://github.com/mishoo/UglifyJS2/tree/harmony",
|
||||||
"author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
|
"author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"version": "3.1.7",
|
"version": "3.1.8",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1487,6 +1487,7 @@ issue_1605_1: {
|
|||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
toplevel: false,
|
toplevel: false,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
function foo(x) {
|
function foo(x) {
|
||||||
@@ -1509,6 +1510,7 @@ issue_1605_2: {
|
|||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
toplevel: "vars",
|
toplevel: "vars",
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
function foo(x) {
|
function foo(x) {
|
||||||
@@ -1636,6 +1638,7 @@ issue_1631_3: {
|
|||||||
var_side_effects_1: {
|
var_side_effects_1: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var print = console.log.bind(console);
|
var print = console.log.bind(console);
|
||||||
@@ -1658,6 +1661,7 @@ var_side_effects_1: {
|
|||||||
var_side_effects_2: {
|
var_side_effects_2: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var print = console.log.bind(console);
|
var print = console.log.bind(console);
|
||||||
@@ -1683,6 +1687,7 @@ var_side_effects_3: {
|
|||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
pure_getters: true,
|
pure_getters: true,
|
||||||
unsafe: true,
|
unsafe: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var print = console.log.bind(console);
|
var print = console.log.bind(console);
|
||||||
@@ -1758,6 +1763,7 @@ iife_2: {
|
|||||||
}(foo);
|
}(foo);
|
||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
|
var foo;
|
||||||
!function(x) {
|
!function(x) {
|
||||||
console.log(x);
|
console.log(x);
|
||||||
}(bar());
|
}(bar());
|
||||||
@@ -2044,6 +2050,7 @@ ref_scope: {
|
|||||||
chained_1: {
|
chained_1: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var a = 2;
|
var a = 2;
|
||||||
@@ -2060,6 +2067,7 @@ chained_1: {
|
|||||||
chained_2: {
|
chained_2: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var a;
|
var a;
|
||||||
@@ -2160,6 +2168,7 @@ inner_lvalues: {
|
|||||||
double_def: {
|
double_def: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var a = x, a = a && y;
|
var a = x, a = a && y;
|
||||||
@@ -2174,6 +2183,7 @@ double_def: {
|
|||||||
toplevel_single_reference: {
|
toplevel_single_reference: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
var a;
|
var a;
|
||||||
@@ -2183,9 +2193,10 @@ toplevel_single_reference: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
var a;
|
for (var b in x) {
|
||||||
for (var b in x)
|
var a;
|
||||||
b(a = b);
|
b(a = b);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3163,6 +3174,7 @@ pure_getters_chain: {
|
|||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
pure_getters: true,
|
pure_getters: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
function o(t, r) {
|
function o(t, r) {
|
||||||
@@ -3183,6 +3195,7 @@ pure_getters_chain: {
|
|||||||
conditional_1: {
|
conditional_1: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
function f(a, b) {
|
function f(a, b) {
|
||||||
@@ -3207,6 +3220,7 @@ conditional_1: {
|
|||||||
conditional_2: {
|
conditional_2: {
|
||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
|
unused: true,
|
||||||
}
|
}
|
||||||
input: {
|
input: {
|
||||||
function f(a, b) {
|
function f(a, b) {
|
||||||
@@ -3289,3 +3303,51 @@ issue_2425_3: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "15"
|
expect_stdout: "15"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_2437: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
conditionals: true,
|
||||||
|
inline: true,
|
||||||
|
join_vars: true,
|
||||||
|
reduce_vars: true,
|
||||||
|
side_effects: true,
|
||||||
|
sequences: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function foo() {
|
||||||
|
bar();
|
||||||
|
}
|
||||||
|
function bar() {
|
||||||
|
if (xhrDesc) {
|
||||||
|
var req = new XMLHttpRequest();
|
||||||
|
var result = !!req.onreadystatechange;
|
||||||
|
Object.defineProperty(XMLHttpRequest.prototype, 'onreadystatechange', xhrDesc || {});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var req = new XMLHttpRequest();
|
||||||
|
var detectFunc = function () { };
|
||||||
|
req.onreadystatechange = detectFunc;
|
||||||
|
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
|
||||||
|
req.onreadystatechange = null;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foo();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
!function() {
|
||||||
|
if (xhrDesc)
|
||||||
|
return result = !!(req = new XMLHttpRequest()).onreadystatechange,
|
||||||
|
Object.defineProperty(XMLHttpRequest.prototype, "onreadystatechange", xhrDesc || {}),
|
||||||
|
result;
|
||||||
|
var req = new XMLHttpRequest(), detectFunc = function() {};
|
||||||
|
req.onreadystatechange = detectFunc;
|
||||||
|
var result = req[SYMBOL_FAKE_ONREADYSTATECHANGE_1] === detectFunc;
|
||||||
|
req.onreadystatechange = null;
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -508,3 +508,41 @@ issue_2114_2: {
|
|||||||
}
|
}
|
||||||
expect_stdout: "2"
|
expect_stdout: "2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_2428: {
|
||||||
|
options = {
|
||||||
|
collapse_vars: true,
|
||||||
|
inline: true,
|
||||||
|
passes: 2,
|
||||||
|
pure_getters: "strict",
|
||||||
|
reduce_vars: true,
|
||||||
|
side_effects: true,
|
||||||
|
toplevel: true,
|
||||||
|
unsafe: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function bar(k) {
|
||||||
|
console.log(k);
|
||||||
|
}
|
||||||
|
function foo(x) {
|
||||||
|
return bar(x);
|
||||||
|
}
|
||||||
|
function baz(a) {
|
||||||
|
foo(a);
|
||||||
|
}
|
||||||
|
baz(42);
|
||||||
|
baz("PASS");
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
function baz(a) {
|
||||||
|
console.log(a);
|
||||||
|
}
|
||||||
|
baz(42);
|
||||||
|
baz("PASS");
|
||||||
|
}
|
||||||
|
expect_stdout: [
|
||||||
|
"42",
|
||||||
|
"PASS",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ this_binding_collapse_vars: {
|
|||||||
options = {
|
options = {
|
||||||
collapse_vars: true,
|
collapse_vars: true,
|
||||||
toplevel: true,
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
};
|
};
|
||||||
input: {
|
input: {
|
||||||
var c = a; c();
|
var c = a; c();
|
||||||
|
|||||||
@@ -2131,14 +2131,13 @@ redefine_farg_1: {
|
|||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
function f(a) {
|
function f(a) {
|
||||||
var a;
|
|
||||||
return typeof a;
|
return typeof a;
|
||||||
}
|
}
|
||||||
function g() {
|
function g() {
|
||||||
return"number";
|
return "number";
|
||||||
}
|
}
|
||||||
function h(a, b) {
|
function h(a, b) {
|
||||||
var a = b;
|
a = b;
|
||||||
return typeof a;
|
return typeof a;
|
||||||
}
|
}
|
||||||
console.log(f([]), g([]), h([]));
|
console.log(f([]), g([]), h([]));
|
||||||
@@ -2173,10 +2172,9 @@ redefine_farg_2: {
|
|||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
console.log(function(a) {
|
console.log(function(a) {
|
||||||
var a;
|
|
||||||
return typeof a;
|
return typeof a;
|
||||||
}([]), "number",function(a, b) {
|
}([]), "number",function(a, b) {
|
||||||
var a = b;
|
a = b;
|
||||||
return typeof a;
|
return typeof a;
|
||||||
}([]));
|
}([]));
|
||||||
}
|
}
|
||||||
@@ -2185,11 +2183,13 @@ redefine_farg_2: {
|
|||||||
|
|
||||||
redefine_farg_3: {
|
redefine_farg_3: {
|
||||||
options = {
|
options = {
|
||||||
|
cascade: true,
|
||||||
evaluate: true,
|
evaluate: true,
|
||||||
inline: true,
|
inline: true,
|
||||||
keep_fargs: false,
|
keep_fargs: false,
|
||||||
passes: 3,
|
passes: 2,
|
||||||
reduce_vars: true,
|
reduce_vars: true,
|
||||||
|
sequences: true,
|
||||||
side_effects: true,
|
side_effects: true,
|
||||||
toplevel: true,
|
toplevel: true,
|
||||||
unused: true,
|
unused: true,
|
||||||
@@ -3827,3 +3827,306 @@ issue_2423_6: {
|
|||||||
"2",
|
"2",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_2440_eval_1: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
exec = function() {
|
||||||
|
return eval("foo()");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
exec = function() {
|
||||||
|
return eval("foo()");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
issue_2440_eval_2: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
exec = function() {
|
||||||
|
return eval("foo()");
|
||||||
|
};
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
exec = function() {
|
||||||
|
return eval("foo()");
|
||||||
|
};
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
issue_2440_with_1: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
with (o) whatever();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
with (o) whatever();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
issue_2440_with_2: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
with (o) whatever();
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
baz = {
|
||||||
|
quux: foo
|
||||||
|
};
|
||||||
|
with (o) whatever();
|
||||||
|
function foo() {
|
||||||
|
return bar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
issue_2442: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
toplevel: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
function foo() {
|
||||||
|
foo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
recursive_inlining_1: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
!function() {
|
||||||
|
function foo() { bar(); }
|
||||||
|
function bar() { foo(); }
|
||||||
|
console.log("PASS");
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
!function() {
|
||||||
|
console.log("PASS");
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|
||||||
|
recursive_inlining_2: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
!function() {
|
||||||
|
function foo() { qux(); }
|
||||||
|
function bar() { foo(); }
|
||||||
|
function qux() { bar(); }
|
||||||
|
console.log("PASS");
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
!function() {
|
||||||
|
console.log("PASS");
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect_stdout: "PASS"
|
||||||
|
}
|
||||||
|
|
||||||
|
recursive_inlining_3: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
!function() {
|
||||||
|
function foo(x) { console.log("foo", x); if (x) bar(x-1); }
|
||||||
|
function bar(x) { console.log("bar", x); if (x) qux(x-1); }
|
||||||
|
function qux(x) { console.log("qux", x); if (x) foo(x-1); }
|
||||||
|
qux(4);
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
!function() {
|
||||||
|
function qux(x) {
|
||||||
|
console.log("qux", x);
|
||||||
|
if (x) (function(x) {
|
||||||
|
console.log("foo", x);
|
||||||
|
if (x) (function(x) {
|
||||||
|
console.log("bar", x);
|
||||||
|
if (x) qux(x - 1);
|
||||||
|
})(x - 1);
|
||||||
|
})(x - 1);
|
||||||
|
}
|
||||||
|
qux(4);
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect_stdout: [
|
||||||
|
"qux 4",
|
||||||
|
"foo 3",
|
||||||
|
"bar 2",
|
||||||
|
"qux 1",
|
||||||
|
"foo 0",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
recursive_inlining_4: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
!function() {
|
||||||
|
function foo(x) { console.log("foo", x); if (x) bar(x-1); }
|
||||||
|
function bar(x) { console.log("bar", x); if (x) qux(x-1); }
|
||||||
|
function qux(x) { console.log("qux", x); if (x) foo(x-1); }
|
||||||
|
qux(4);
|
||||||
|
bar(5);
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
!function() {
|
||||||
|
function bar(x) {
|
||||||
|
console.log("bar", x);
|
||||||
|
if (x) qux(x - 1);
|
||||||
|
}
|
||||||
|
function qux(x) {
|
||||||
|
console.log("qux", x);
|
||||||
|
if (x) (function(x) {
|
||||||
|
console.log("foo", x);
|
||||||
|
if (x) bar(x - 1);
|
||||||
|
})(x - 1);
|
||||||
|
}
|
||||||
|
qux(4);
|
||||||
|
bar(5);
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect_stdout: [
|
||||||
|
"qux 4",
|
||||||
|
"foo 3",
|
||||||
|
"bar 2",
|
||||||
|
"qux 1",
|
||||||
|
"foo 0",
|
||||||
|
"bar 5",
|
||||||
|
"qux 4",
|
||||||
|
"foo 3",
|
||||||
|
"bar 2",
|
||||||
|
"qux 1",
|
||||||
|
"foo 0",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
recursive_inlining_5: {
|
||||||
|
options = {
|
||||||
|
reduce_vars: true,
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
!function() {
|
||||||
|
function foo(x) { console.log("foo", x); if (x) bar(x-1); }
|
||||||
|
function bar(x) { console.log("bar", x); if (x) qux(x-1); }
|
||||||
|
function qux(x) { console.log("qux", x); if (x) foo(x-1); }
|
||||||
|
qux(4);
|
||||||
|
bar(5);
|
||||||
|
foo(3);
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
!function() {
|
||||||
|
function foo(x) {
|
||||||
|
console.log("foo", x);
|
||||||
|
if (x) bar(x - 1);
|
||||||
|
}
|
||||||
|
function bar(x) {
|
||||||
|
console.log("bar", x);
|
||||||
|
if (x) qux(x - 1);
|
||||||
|
}
|
||||||
|
function qux(x) {
|
||||||
|
console.log("qux", x);
|
||||||
|
if (x) foo(x - 1);
|
||||||
|
}
|
||||||
|
qux(4);
|
||||||
|
bar(5);
|
||||||
|
foo(3);
|
||||||
|
}();
|
||||||
|
}
|
||||||
|
expect_stdout: [
|
||||||
|
"qux 4",
|
||||||
|
"foo 3",
|
||||||
|
"bar 2",
|
||||||
|
"qux 1",
|
||||||
|
"foo 0",
|
||||||
|
"bar 5",
|
||||||
|
"qux 4",
|
||||||
|
"foo 3",
|
||||||
|
"bar 2",
|
||||||
|
"qux 1",
|
||||||
|
"foo 0",
|
||||||
|
"foo 3",
|
||||||
|
"bar 2",
|
||||||
|
"qux 1",
|
||||||
|
"foo 0",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user