implement annotations (#4763)
This commit is contained in:
@@ -48,6 +48,7 @@ function Compressor(options, false_by_default) {
|
||||
return new Compressor(options, false_by_default);
|
||||
TreeTransformer.call(this, this.before, this.after);
|
||||
this.options = defaults(options, {
|
||||
annotations : !false_by_default,
|
||||
arguments : !false_by_default,
|
||||
arrows : !false_by_default,
|
||||
assignments : !false_by_default,
|
||||
@@ -4725,7 +4726,7 @@ merge(Compressor.prototype, {
|
||||
|| expr.expression.name == "Math" && expr.property == "random");
|
||||
}
|
||||
}
|
||||
return this.pure || !compressor.pure_funcs(this);
|
||||
return compressor.option("annotations") && this.pure || !compressor.pure_funcs(this);
|
||||
});
|
||||
AST_Node.DEFMETHOD("is_call_pure", return_false);
|
||||
AST_Call.DEFMETHOD("is_call_pure", function(compressor) {
|
||||
|
||||
Reference in New Issue
Block a user