reduce memory pressure via bit fields (#5203)

This commit is contained in:
Alex Lam S.L
2021-12-06 03:30:05 +00:00
committed by GitHub
parent b0799105c2
commit 033d8d9405
8 changed files with 97 additions and 21 deletions

View File

@@ -44,9 +44,8 @@
"use strict";
function SymbolDef(id, scope, orig, init) {
this._bits = 0;
this.eliminated = 0;
this.exported = false;
this.global = false;
this.id = id;
this.init = init;
this.mangled_name = null;
@@ -55,7 +54,6 @@ function SymbolDef(id, scope, orig, init) {
this.references = [];
this.replaced = 0;
this.scope = scope;
this.undeclared = false;
}
SymbolDef.prototype = {
@@ -104,6 +102,15 @@ SymbolDef.prototype = {
},
};
DEF_BITPROPS(SymbolDef, [
"const_redefs",
"cross_loop",
"direct_access",
"exported",
"global",
"undeclared",
]);
var unary_side_effects = makePredicate("delete ++ --");
function is_lhs(node, parent) {