[JVM IR] Fix jvm linker
This commit is contained in:
+7
-1
@@ -38,7 +38,7 @@ abstract class IrModuleDeserializer(val moduleDescriptor: ModuleDescriptor) {
|
|||||||
abstract fun deserializeIrSymbol(idSig: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol
|
abstract fun deserializeIrSymbol(idSig: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol
|
||||||
|
|
||||||
open fun declareIrSymbol(symbol: IrSymbol) {
|
open fun declareIrSymbol(symbol: IrSymbol) {
|
||||||
assert(symbol.isPublicApi)
|
assert(symbol.isPublicApi) { "Symbol is not public API: ${symbol.descriptor}" }
|
||||||
assert(symbol.descriptor !is WrappedDeclarationDescriptor<*>)
|
assert(symbol.descriptor !is WrappedDeclarationDescriptor<*>)
|
||||||
deserializeIrSymbol(symbol.signature, symbol.kind())
|
deserializeIrSymbol(symbol.signature, symbol.kind())
|
||||||
}
|
}
|
||||||
@@ -175,6 +175,12 @@ class IrModuleDeserializerWithBuiltIns(
|
|||||||
return delegate.deserializeIrSymbol(idSig, symbolKind)
|
return delegate.deserializeIrSymbol(idSig, symbolKind)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun declareIrSymbol(symbol: IrSymbol) {
|
||||||
|
if (symbol.isPublicApi && checkIsFunctionInterface(symbol.signature))
|
||||||
|
resolveFunctionalInterface(symbol.signature, symbol.kind())
|
||||||
|
else delegate.declareIrSymbol(symbol)
|
||||||
|
}
|
||||||
|
|
||||||
override fun postProcess() {
|
override fun postProcess() {
|
||||||
delegate.postProcess()
|
delegate.postProcess()
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ class JvmIrLinker(currentModule: ModuleDescriptor?, logger: LoggingContext, buil
|
|||||||
private val javaName = Name.identifier("java")
|
private val javaName = Name.identifier("java")
|
||||||
|
|
||||||
override fun isBuiltInModule(moduleDescriptor: ModuleDescriptor): Boolean =
|
override fun isBuiltInModule(moduleDescriptor: ModuleDescriptor): Boolean =
|
||||||
moduleDescriptor.name.asString() == "<built-ins module>"
|
moduleDescriptor.name.asString().startsWith("<dependencies of ")
|
||||||
|
|
||||||
// TODO: implement special Java deserializer
|
// TODO: implement special Java deserializer
|
||||||
override fun createModuleDeserializer(moduleDescriptor: ModuleDescriptor, klib: IrLibrary?, strategy: DeserializationStrategy): IrModuleDeserializer {
|
override fun createModuleDeserializer(moduleDescriptor: ModuleDescriptor, klib: IrLibrary?, strategy: DeserializationStrategy): IrModuleDeserializer {
|
||||||
|
|||||||
Reference in New Issue
Block a user