reduce memory pressure via bit fields (#5203)
This commit is contained in:
@@ -898,7 +898,7 @@ Compressor.prototype.compress = function(node) {
|
||||
if (left.equivalent_to(right) && !left.has_side_effects(compressor)) {
|
||||
right.walk(tw);
|
||||
walk_prop(left);
|
||||
node.__drop = true;
|
||||
node.redundant = true;
|
||||
return true;
|
||||
}
|
||||
if (ld && right instanceof AST_LambdaExpression) {
|
||||
@@ -2274,7 +2274,7 @@ Compressor.prototype.compress = function(node) {
|
||||
stop_if_hit = if_hit;
|
||||
stop_after = after;
|
||||
can_replace = replace;
|
||||
delete fn.collapse_scanning;
|
||||
fn.collapse_scanning = false;
|
||||
if (!abort) return false;
|
||||
abort = false;
|
||||
return true;
|
||||
@@ -4919,7 +4919,7 @@ Compressor.prototype.compress = function(node) {
|
||||
}
|
||||
if (node instanceof AST_Scope && node !== fn) return true;
|
||||
}));
|
||||
delete fn.evaluating;
|
||||
fn.evaluating = false;
|
||||
if (!found) return;
|
||||
}
|
||||
return this;
|
||||
@@ -4935,7 +4935,7 @@ Compressor.prototype.compress = function(node) {
|
||||
});
|
||||
fn.evaluating = true;
|
||||
val = val._eval(compressor, ignore_side_effects, cached, depth);
|
||||
delete fn.evaluating;
|
||||
fn.evaluating = false;
|
||||
}
|
||||
cached_args.forEach(function(node) {
|
||||
delete node._eval;
|
||||
@@ -8055,7 +8055,7 @@ Compressor.prototype.compress = function(node) {
|
||||
}) && all(fn.argnames, function(argname) {
|
||||
return !argname.match_symbol(return_false);
|
||||
}) && !(fn.rest && fn.rest.match_symbol(return_false));
|
||||
delete fn.new;
|
||||
fn.new = false;
|
||||
return result;
|
||||
}
|
||||
function drop_class(self, compressor, first_in_statement) {
|
||||
@@ -11640,7 +11640,7 @@ Compressor.prototype.compress = function(node) {
|
||||
if (compressor.option("dead_code")) {
|
||||
if (self.left instanceof AST_PropAccess) {
|
||||
if (self.operator == "=") {
|
||||
if (self.__drop) {
|
||||
if (self.redundant) {
|
||||
var exprs = [ self.left.expression ];
|
||||
if (self.left instanceof AST_Sub) exprs.push(self.left.property);
|
||||
exprs.push(self.right);
|
||||
|
||||
Reference in New Issue
Block a user