Move type-> color conversion immediately after DisambiguateProperties
The only effect on optimized output is a potential few bytes improvement coming from peepohole optimizations.
@@ -651,6 +651,14 @@ public final class DefaultPassConfig extends PassConfig {
}
}
+ if (options.checkTypes || options.inferTypes) {
+ passes.add(typesToColors);
+ }
+
+ if (!options.shouldUnsafelyPreserveTypesForDebugging()) {
+ passes.add(removeTypes);
+ }
+
if (options.computeFunctionSideEffects) {
passes.add(markPureFunctions);
}
@@ -676,14 +684,6 @@ public final class DefaultPassConfig extends PassConfig {
passes.add(replaceStrings);
}
- if (options.checkTypes || options.inferTypes) {
- passes.add(typesToColors);
- }
-
- if (!options.shouldUnsafelyPreserveTypesForDebugging()) {
- passes.add(removeTypes);
- }
-
// TODO(user): This forces a first crack at crossChunkCodeMotion
// before devirtualization. Once certain functions are devirtualized,
// it confuses crossChunkCodeMotion ability to recognized that
