@@ -237,12 +237,25 @@ private void performMinimalInliningAndModuleExportCollapsing(Node externs, Node
237
237
// and reuse that one instead.
238
238
namespace = new GlobalNamespace (decisionsLog , compiler , root );
239
239
new CollapseProperties ().process (externs , root );
240
+
241
+ namespace = null ; // free up memory before PropagateConstantPropertyOverVars
242
+ // This shouldn't be necessary, this pass should already be setting new constants as
243
+ // constant.
244
+ // TODO(b/64256754): Investigate.
245
+ new PropagateConstantPropertyOverVars (compiler , false ).process (externs , root );
240
246
}
241
247
242
248
private void performAggressiveInliningAndCollapsing (Node externs , Node root ) {
243
249
new ConcretizeStaticInheritanceForInlining (compiler ).process (externs , root );
244
250
new AggressiveInlineAliases ().process (externs , root );
251
+
245
252
new CollapseProperties ().process (externs , root );
253
+
254
+ namespace = null ; // free up memory before PropagateConstantPropertyOverVars
255
+ // This shouldn't be necessary, this pass should already be setting new constants as
256
+ // constant.
257
+ // TODO(b/64256754): Investigate.
258
+ new PropagateConstantPropertyOverVars (compiler , false ).process (externs , root );
246
259
}
247
260
248
261
private void performAggressiveInliningForTest (Node externs , Node root ) {
@@ -1297,11 +1310,6 @@ public void process(Node externs, Node root) {
1297
1310
// invalidating the node ancestry stored with each reference.
1298
1311
collapseDeclarationOfNameAndDescendants (name , name .getBaseName (), escaped );
1299
1312
}
1300
-
1301
- // This shouldn't be necessary, this pass should already be setting new constants as
1302
- // constant.
1303
- // TODO(b/64256754): Investigate.
1304
- new PropagateConstantPropertyOverVars (compiler , false ).process (externs , root );
1305
1313
}
1306
1314
1307
1315
private boolean canCollapse (Name name ) {
0 commit comments