Don't share descriptor table between runs.
This commit is contained in:
committed by
alexander-gorshenev
parent
2403f874a6
commit
3139ae279c
+1
-2
@@ -121,14 +121,13 @@ internal fun DeserializedSimpleFunctionDescriptor.nameResolver(): NameResolver {
|
||||
// Kotlin descriptors and types for IR.
|
||||
|
||||
internal class IrDescriptorDeserializer(val context: Context,
|
||||
val deserializationDescriptorIndex: IrDeserializationDescriptorIndex,
|
||||
val rootFunction: DeserializedSimpleFunctionDescriptor,
|
||||
val localDeserializer: LocalDeclarationDeserializer) {
|
||||
|
||||
val loopIndex = mutableMapOf<Int, IrLoop>()
|
||||
val nameResolver = rootFunction.nameResolver() as NameResolverImpl
|
||||
val nameTable = rootFunction.nameTable()
|
||||
val descriptorIndex = deserializationDescriptorIndex.map
|
||||
val descriptorIndex = IrDeserializationDescriptorIndex(context.irBuiltIns).map
|
||||
|
||||
fun deserializeKotlinType(proto: KonanIr.KotlinType): KotlinType {
|
||||
|
||||
|
||||
+1
-2
@@ -562,7 +562,6 @@ internal class IrSerializer(val context: Context,
|
||||
// --------- Deserializer part -----------------------------
|
||||
|
||||
internal class IrDeserializer(val context: Context,
|
||||
val descriptorIndex: IrDeserializationDescriptorIndex,
|
||||
val rootFunction: DeserializedSimpleFunctionDescriptor) {
|
||||
|
||||
val loopIndex = mutableMapOf<Int, IrLoop>()
|
||||
@@ -570,7 +569,7 @@ internal class IrDeserializer(val context: Context,
|
||||
val localDeserializer = LocalDeclarationDeserializer(rootFunction, context.moduleDescriptor)
|
||||
|
||||
val descriptorDeserializer = IrDescriptorDeserializer(
|
||||
context, descriptorIndex, rootFunction, localDeserializer)
|
||||
context, rootFunction, localDeserializer)
|
||||
|
||||
|
||||
fun deserializeKotlinType(proto: KonanIr.KotlinType)
|
||||
|
||||
+1
-4
@@ -41,8 +41,6 @@ import org.jetbrains.kotlin.backend.common.validateIrFunction
|
||||
|
||||
internal class DeserializerDriver(val context: Context) {
|
||||
|
||||
val descriptorIndex = IrDeserializationDescriptorIndex(context.irBuiltIns)
|
||||
|
||||
internal fun deserializeInlineBody(descriptor: FunctionDescriptor): IrDeclaration? {
|
||||
if (!descriptor.needsInlining) return null
|
||||
|
||||
@@ -54,7 +52,7 @@ internal class DeserializerDriver(val context: Context) {
|
||||
PhaseManager(context).phase(KonanPhase.DESERIALIZER) {
|
||||
context.log("### IR deserialization attempt:\t$descriptor")
|
||||
try {
|
||||
deserializedIr = IrDeserializer(context, descriptorIndex, descriptor).decodeDeclaration()
|
||||
deserializedIr = IrDeserializer(context, descriptor).decodeDeclaration()
|
||||
context.log("${deserializedIr!!.descriptor}")
|
||||
context.log(ir2stringWhole(deserializedIr!!))
|
||||
context.log("IR deserialization SUCCESS:\t$descriptor")
|
||||
@@ -84,7 +82,6 @@ internal class DeserializerDriver(val context: Context) {
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user