[IR SERIALIZATION] Fix rebase
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
+1
-5
@@ -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)) {
|
||||
|
||||
+2
-1
@@ -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) })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user