[JS IR] IC: avoid conflicts in local declaration signatures
This commit is contained in:
+1
@@ -73,6 +73,7 @@ class FileDeserializationState(
|
||||
fileProto.actualList,
|
||||
::addIdSignature,
|
||||
linker::handleExpectActualMapping,
|
||||
symbolProcessor = linker.symbolProcessor,
|
||||
) { idSig, symbolKind ->
|
||||
|
||||
val topLevelSig = idSig.topLevelSignature()
|
||||
|
||||
+2
-1
@@ -27,6 +27,7 @@ class IrSymbolDeserializer(
|
||||
val handleExpectActualMapping: (IdSignature, IrSymbol) -> IrSymbol,
|
||||
private val enqueueAllDeclarations: Boolean = false,
|
||||
val deserializedSymbols: MutableMap<IdSignature, IrSymbol> = mutableMapOf(), // Per-file signature cache. TODO: do we really need it?
|
||||
val symbolProcessor: IrSymbolDeserializer.(IrSymbol, IdSignature) -> IrSymbol = { s, _ -> s },
|
||||
val deserializePublicSymbol: (IdSignature, BinarySymbolData.SymbolKind) -> IrSymbol,
|
||||
) {
|
||||
|
||||
@@ -39,7 +40,7 @@ class IrSymbolDeserializer(
|
||||
}
|
||||
|
||||
private fun referenceDeserializedSymbol(symbolKind: BinarySymbolData.SymbolKind, idSig: IdSignature): IrSymbol {
|
||||
return referenceDeserializedSymbol(symbolTable, fileSymbol, symbolKind, idSig)
|
||||
return symbolProcessor(referenceDeserializedSymbol(symbolTable, fileSymbol, symbolKind, idSig), idSig)
|
||||
}
|
||||
|
||||
fun referenceLocalIrSymbol(symbol: IrSymbol, signature: IdSignature) {
|
||||
|
||||
+2
-1
@@ -36,7 +36,8 @@ abstract class KotlinIrLinker(
|
||||
val builtIns: IrBuiltIns,
|
||||
val symbolTable: SymbolTable,
|
||||
private val exportedDependencies: List<ModuleDescriptor>,
|
||||
private val allowUnboundSymbols: Boolean = false
|
||||
private val allowUnboundSymbols: Boolean = false,
|
||||
val symbolProcessor: IrSymbolDeserializer.(IrSymbol, IdSignature) -> IrSymbol = { s, _ -> s },
|
||||
) : IrDeserializer, FileLocalAwareLinker {
|
||||
|
||||
// Kotlin-MPP related data. Consider some refactoring
|
||||
|
||||
Reference in New Issue
Block a user