Move `assertAllOneTimePasses` directly before the first optimization loop
@@ -574,8 +574,6 @@ public final class DefaultPassConfig extends PassConfig {
passes.add(j2clAssertRemovalPass);
}
- assertAllOneTimePasses(passes);
-
// Inline aliases so that following optimizations don't have to understand alias chains.
if (options.getPropertyCollapseLevel() == PropertyCollapseLevel.ALL) {
if (options.needsTranspilationFrom(ES6)) {
@@ -646,6 +644,8 @@ public final class DefaultPassConfig extends PassConfig {
passes.add(markPureFunctions);
}
+ assertAllOneTimePasses(passes);
+
if (options.smartNameRemoval) {
passes.addAll(getCodeRemovingPasses());
// TODO(b/66971163): Remove this early loop or rename the option that enables it
