Mark j2cl passes as ES6-compatible.
Since they were written pretty recently, they should already be compatible.
@@ -3293,8 +3293,7 @@ public final class DefaultPassConfig extends PassConfig {
}
@VisibleForTesting
- static Map<String, Node> getAdditionalReplacements(
- CompilerOptions options) {
+ static Map<String, Node> getAdditionalReplacements(CompilerOptions options) {
Map<String, Node> additionalReplacements = new HashMap<>();
if (options.markAsCompiled || options.closurePass) {
@@ -3359,6 +3358,11 @@ public final class DefaultPassConfig extends PassConfig {
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clConstantHoisterPass(compiler);
}
+
+ @Override
+ protected FeatureSet featureSet() {
+ return ES8_MODULES;
+ }
};
/** Optimizes J2CL clinit methods. */
@@ -3369,6 +3373,11 @@ public final class DefaultPassConfig extends PassConfig {
List<Node> changedScopeNodes = compiler.getChangedScopeNodesForPass(getName());
return new J2clClinitPrunerPass(compiler, changedScopeNodes);
}
+
+ @Override
+ protected FeatureSet featureSet() {
+ return ES8_MODULES;
+ }
};
/** Rewrites J2CL constructs to be more optimizable. */
@@ -3405,6 +3414,11 @@ public final class DefaultPassConfig extends PassConfig {
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clAssertRemovalPass(compiler);
}
+
+ @Override
+ protected FeatureSet featureSet() {
+ return ES8_MODULES;
+ }
};
private final PassFactory j2clSourceFileChecker =
@@ -3426,6 +3440,11 @@ public final class DefaultPassConfig extends PassConfig {
protected CompilerPass create(final AbstractCompiler compiler) {
return new J2clChecksPass(compiler);
}
+
+ @Override
+ protected FeatureSet featureSet() {
+ return ES8_MODULES;
+ }
};
private final PassFactory checkConformance =
