[IR] Made signature nullable (#3860)
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ abstract class GlobalDeclarationTable(
|
||||
protected fun loadKnownBuiltins(builtIns: IrBuiltIns) {
|
||||
builtIns.knownBuiltins.forEach {
|
||||
val symbol = (it as IrSymbolOwner).symbol
|
||||
table[it] = symbol.signature.also { id -> clashTracker.commit(it, id) }
|
||||
table[it] = symbol.signature!!.also { id -> clashTracker.commit(it, id) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ class CurrentModuleWithICDeserializer(
|
||||
symbolTable.forEachPublicSymbol {
|
||||
if (it.descriptor.isDirtyDescriptor()) { // public && non-deserialized should be dirty symbol
|
||||
if (it !in knownBuiltIns) {
|
||||
dirtyDeclarations[it.signature] = it
|
||||
dirtyDeclarations[it.signature!!] = it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -37,9 +37,10 @@ abstract class IrModuleDeserializer(val moduleDescriptor: ModuleDescriptor) {
|
||||
abstract fun deserializeIrSymbol(idSig: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol
|
||||
|
||||
open fun declareIrSymbol(symbol: IrSymbol) {
|
||||
assert(symbol.isPublicApi) { "Symbol is not public API: ${symbol.descriptor}" }
|
||||
val signature = symbol.signature
|
||||
require(signature != null) { "Symbol is not public API: ${symbol.descriptor}" }
|
||||
assert(symbol.descriptor !is WrappedDeclarationDescriptor<*>)
|
||||
deserializeIrSymbol(symbol.signature, symbol.kind())
|
||||
deserializeIrSymbol(signature, symbol.kind())
|
||||
}
|
||||
|
||||
open val klib: IrLibrary get() = error("Unsupported operation")
|
||||
@@ -166,8 +167,9 @@ class IrModuleDeserializerWithBuiltIns(
|
||||
}
|
||||
|
||||
override fun declareIrSymbol(symbol: IrSymbol) {
|
||||
if (symbol.isPublicApi && checkIsFunctionInterface(symbol.signature))
|
||||
resolveFunctionalInterface(symbol.signature, symbol.kind())
|
||||
val signature = symbol.signature
|
||||
if (signature != null && checkIsFunctionInterface(signature))
|
||||
resolveFunctionalInterface(signature, symbol.kind())
|
||||
else delegate.declareIrSymbol(symbol)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user