Eliminated -Xdeserialize-fake-overrides

This commit is contained in:
Alexander Gorshenev
2020-11-05 06:12:24 +03:00
parent b9c6267a63
commit 5de7a10df0
11 changed files with 8 additions and 36 deletions
@@ -150,7 +150,6 @@ fun generateKLib(
irBuiltIns.functionFactory = functionFactory
val expectDescriptorToSymbol = mutableMapOf<DeclarationDescriptor, IrSymbol>()
val deserializeFakeOverrides = configuration.getBoolean(CommonConfigurationKeys.DESERIALIZE_FAKE_OVERRIDES)
val feContext = psi2IrContext.run {
JsIrLinker.JsFePluginContext(moduleDescriptor, bindingContext, symbolTable, typeTranslator, irBuiltIns)
}
@@ -161,8 +160,7 @@ fun generateKLib(
psi2IrContext.symbolTable,
functionFactory,
feContext,
serializedIrFiles?.let { ICData(it, errorPolicy.allowErrors) },
deserializeFakeOverrides
serializedIrFiles?.let { ICData(it, errorPolicy.allowErrors) }
)
sortDependencies(allDependencies.getFullList(), depsDescriptors.descriptors).map {
@@ -227,7 +225,6 @@ fun loadIr(
irFactory: IrFactory,
): IrModuleInfo {
val depsDescriptors = ModulesStructure(project, mainModule, analyzer, configuration, allDependencies, friendDependencies)
val deserializeFakeOverrides = configuration.getBoolean(CommonConfigurationKeys.DESERIALIZE_FAKE_OVERRIDES)
val errorPolicy = configuration.get(JSConfigurationKeys.ERROR_TOLERANCE_POLICY) ?: ErrorTolerancePolicy.DEFAULT
when (mainModule) {
@@ -240,7 +237,7 @@ fun loadIr(
val feContext = psi2IrContext.run {
JsIrLinker.JsFePluginContext(moduleDescriptor, bindingContext, symbolTable, typeTranslator, irBuiltIns)
}
val irLinker = JsIrLinker(psi2IrContext.moduleDescriptor, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, feContext, null, deserializeFakeOverrides)
val irLinker = JsIrLinker(psi2IrContext.moduleDescriptor, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, feContext, null)
val deserializedModuleFragments = sortDependencies(allDependencies.getFullList(), depsDescriptors.descriptors).map {
irLinker.deserializeIrModuleHeader(depsDescriptors.getModuleDescriptor(it), it)
}
@@ -277,7 +274,7 @@ fun loadIr(
val irBuiltIns = IrBuiltIns(moduleDescriptor.builtIns, typeTranslator, symbolTable)
val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable)
val irLinker =
JsIrLinker(null, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, null, null, deserializeFakeOverrides)
JsIrLinker(null, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, null, null)
val deserializedModuleFragments = sortDependencies(allDependencies.getFullList(), depsDescriptors.descriptors).map {
val strategy =
@@ -27,9 +27,8 @@ class JsIrLinker(
private val currentModule: ModuleDescriptor?, logger: LoggingContext, builtIns: IrBuiltIns, symbolTable: SymbolTable,
override val functionalInterfaceFactory: IrAbstractFunctionFactory,
override val translationPluginContext: TranslationPluginContext?,
private val icData: ICData? = null,
deserializeFakeOverrides: Boolean = FakeOverrideControl.deserializeFakeOverrides
) : KotlinIrLinker(currentModule, logger, builtIns, symbolTable, emptyList(), deserializeFakeOverrides) {
private val icData: ICData? = null
) : KotlinIrLinker(currentModule, logger, builtIns, symbolTable, emptyList()) {
override val fakeOverrideBuilder = FakeOverrideBuilder(this, symbolTable, IdSignatureSerializer(JsManglerIr), builtIns)