have #__PURE__ hint only work when compress side_effects option enabled

This commit is contained in:
kzc 2017-02-21 00:30:11 -05:00
parent 883ce8148b
commit b943c0d438

View File

@ -1288,7 +1288,7 @@ merge(Compressor.prototype, {
} }
def(AST_Call, function(compressor){ def(AST_Call, function(compressor){
if (has_pure_annotation(this)) { if (compressor.option("side_effects") && has_pure_annotation(this)) {
compressor.warn("Dropping __PURE__ call [{file}:{line},{col}]", this.start); compressor.warn("Dropping __PURE__ call [{file}:{line},{col}]", this.start);
return false; return false;
} }