[IR SERIALIZATION] Fix rebase

This commit is contained in:
Roman Artemev
2019-08-12 22:08:43 +03:00
committed by romanart
parent 16be3b6d6e
commit 55f06ecff5
5 changed files with 8 additions and 18 deletions
@@ -38,7 +38,7 @@ abstract class GlobalDeclarationTable(private val mangler: KotlinMangler, privat
protected open fun loadKnownBuiltins(builtIns: IrBuiltIns, startIndex: Long): Long {
var index = startIndex
builtIns.knownBuiltins.forEach {
table[it.owner] = UniqId(index++, false)
table[it.owner] = UniqId(index++, false).also { id -> clashTracker.commit(it.owner, id) }
}
return index
}
@@ -29,11 +29,7 @@ abstract class DescriptorReferenceDeserializer(
) : DescriptorUniqIdAware {
protected open fun resolveSpecialDescriptor(fqn: FqName) = builtIns.builtIns.getBuiltInClassByFqName(fqn)
protected abstract fun resolveSpecialDescriptor(fqn: FqName): DeclarationDescriptor
abstract fun checkIfSpecialDescriptorId(id: Long): Boolean
protected abstract fun getDescriptorIdOrNull(descriptor: DeclarationDescriptor): Long?
protected open fun checkIfSpecialDescriptorId(id: Long) = with(mangler) { id.isSpecial }
open fun checkIfSpecialDescriptorId(id: Long) = with(mangler) { id.isSpecial }
protected open fun getDescriptorIdOrNull(descriptor: DeclarationDescriptor) =
if (isBuiltInFunction(descriptor)) {
@@ -6,6 +6,7 @@
package org.jetbrains.kotlin.backend.common.serialization
import org.jetbrains.kotlin.backend.common.LoggingContext
import org.jetbrains.kotlin.builtins.FunctionInterfacePackageFragment
import org.jetbrains.kotlin.ir.declarations.IrFile
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
import org.jetbrains.kotlin.library.SerializedIrFile
@@ -20,6 +21,6 @@ abstract class IrModuleSerializer<F : IrFileSerializer>(protected val logger: Lo
}
fun serializedIrModule(module: IrModuleFragment): SerializedIrModule {
return SerializedIrModule(module.files.map { serializeIrFile(it) })
return SerializedIrModule(module.files.filter { it.packageFragmentDescriptor !is FunctionInterfacePackageFragment }.map { serializeIrFile(it) })
}
}