Made -Xfake-override-validator off by default

Deprected -Xdisable-fake-override-validator
This commit is contained in:
Alexander Gorshenev
2020-11-14 03:29:45 +03:00
parent 4e03b1e05f
commit f42b902bc8
5 changed files with 12 additions and 7 deletions
@@ -172,9 +172,13 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xenable-js-scripting", description = "Enable experimental support of .kts files using K/JS (with -Xir only)")
var enableJsScripting: Boolean by FreezableVar(false)
@Argument(value = "-Xdisable-fake-override-validator", description = "Disable IR fake override validator")
@Argument(value = "-Xdisable-fake-override-validator", description = "This option is deprecated")
var disableFakeOverrideValidator: Boolean by FreezableVar(false)
@Argument(value = "-Xfake-override-validator", description = "Enable IR fake override validator")
var fakeOverrideValidator: Boolean by FreezableVar(false)
@Argument(value = "-Xerror-tolerance-policy", description = "Set up error tolerance policy (NONE, SEMANTIC, SYNTAX, ALL)")
var errorTolerancePolicy: String? by NullableStringFreezableVar(null)
@@ -364,7 +364,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
}
configuration.put(JSConfigurationKeys.PRINT_REACHABILITY_INFO, arguments.irDcePrintReachabilityInfo)
configuration.put(JSConfigurationKeys.DISABLE_FAKE_OVERRIDE_VALIDATOR, arguments.disableFakeOverrideValidator)
configuration.put(JSConfigurationKeys.FAKE_OVERRIDE_VALIDATOR, arguments.fakeOverrideValidator)
}
override fun executableScriptFileName(): String {
@@ -170,7 +170,7 @@ fun generateKLib(
val moduleFragment = psi2IrContext.generateModuleFragmentWithPlugins(project, files, irLinker, expectDescriptorToSymbol)
moduleFragment.acceptVoid(ManglerChecker(JsManglerIr, Ir2DescriptorManglerAdapter(JsManglerDesc)))
if (!configuration.getBoolean(JSConfigurationKeys.DISABLE_FAKE_OVERRIDE_VALIDATOR)) {
if (configuration.getBoolean(JSConfigurationKeys.FAKE_OVERRIDE_VALIDATOR)) {
val fakeOverrideChecker = FakeOverrideChecker(JsManglerIr, JsManglerDesc)
irLinker.modules.forEach { fakeOverrideChecker.check(it) }
}
@@ -249,7 +249,7 @@ fun loadIr(
val mangleChecker = ManglerChecker(JsManglerIr, Ir2DescriptorManglerAdapter(JsManglerDesc))
moduleFragment.acceptVoid(mangleChecker)
if (!configuration.getBoolean(JSConfigurationKeys.DISABLE_FAKE_OVERRIDE_VALIDATOR)) {
if (configuration.getBoolean(JSConfigurationKeys.FAKE_OVERRIDE_VALIDATOR)) {
val fakeOverrideChecker = FakeOverrideChecker(JsManglerIr, JsManglerDesc)
irLinker.modules.forEach { fakeOverrideChecker.check(it) }
}
+2 -1
View File
@@ -1,9 +1,10 @@
Usage: kotlinc-js <options> <source files>
where advanced options include:
-Xdisable-fake-override-validator
Disable IR fake override validator
This option is deprecated
-Xenable-js-scripting Enable experimental support of .kts files using K/JS (with -Xir only)
-Xerror-tolerance-policy Set up error tolerance policy (NONE, SEMANTIC, SYNTAX, ALL)
-Xfake-override-validator Enable IR fake override validator
-Xfriend-modules=<path> Paths to friend modules
-Xfriend-modules-disabled Disable internal declaration export
-Xgenerate-dts Generate TypeScript declarations .d.ts file alongside JS file. Available in IR backend only.
@@ -84,8 +84,8 @@ public class JSConfigurationKeys {
public static final CompilerConfigurationKey<Boolean> PRINT_REACHABILITY_INFO =
CompilerConfigurationKey.create("print declarations' reachability info during performing DCE");
public static final CompilerConfigurationKey<Boolean> DISABLE_FAKE_OVERRIDE_VALIDATOR =
CompilerConfigurationKey.create("disable IR fake override validator");
public static final CompilerConfigurationKey<Boolean> FAKE_OVERRIDE_VALIDATOR =
CompilerConfigurationKey.create("IR fake override validator");
public static final CompilerConfigurationKey<ErrorTolerancePolicy> ERROR_TOLERANCE_POLICY =
CompilerConfigurationKey.create("set up policy to ignore compilation errors");