use of com.google.javascript.jscomp.Normalize.PropagateConstantAnnotationsOverVars in project closure-compiler by google.
the class CollapseProperties method process.
@Override
public void process(Node externs, Node root) {
GlobalNamespace namespace = new GlobalNamespace(compiler, root);
nameMap = namespace.getNameIndex();
globalNames = namespace.getNameForest();
checkNamespaces();
for (Name name : globalNames) {
flattenReferencesToCollapsibleDescendantNames(name, name.getBaseName());
}
// invalidating the node ancestry stored with each reference.
for (Name name : globalNames) {
collapseDeclarationOfNameAndDescendants(name, name.getBaseName());
}
// This shouldn't be necessary, this pass should already be setting new constants as constant.
// TODO(b/64256754): Investigate.
(new PropagateConstantAnnotationsOverVars(compiler, false)).process(externs, root);
}
Aggregations