Move runtimeTypeCheck to stage 1 to make it run before TypedAST colors
This pass hasn't been tested on actual project code for a while, but it seems like it might be useful to keep around for validating future type-based optimization work.
@@ -488,6 +488,10 @@ public final class DefaultPassConfig extends PassConfig {
checks.add(externExports);
}
+ if (options.runtimeTypeCheck) {
+ checks.add(runtimeTypeCheck);
+ }
+
if (!options.checksOnly) {
checks.add(removeWeakSources);
checks.add(garbageCollectChecks);
@@ -549,10 +553,6 @@ public final class DefaultPassConfig extends PassConfig {
passes.add(instrumentForCodeCoverage);
}
- if (options.runtimeTypeCheck) {
- passes.add(runtimeTypeCheck);
- }
-
passes.add(createEmptyPass(PassNames.BEFORE_STANDARD_OPTIMIZATIONS));
if (options.replaceIdGenerators) {
