[PLUGIN API] Do postprocess after symbol resolve
This commit is contained in:
+5
-4
@@ -24,6 +24,7 @@ import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.BindingContext
|
||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope
|
||||
|
||||
// TODO: Make IrPluginContext be interface
|
||||
open class IrPluginContext(
|
||||
@Deprecated("FrontEnd API shouldn't be accessed in Ir plugin environment")
|
||||
val moduleDescriptor: ModuleDescriptor,
|
||||
@@ -58,8 +59,8 @@ open class IrPluginContext(
|
||||
if (symbol.isBound) return symbol
|
||||
|
||||
linker.getDeclaration(symbol)
|
||||
// TODO: post process
|
||||
// linker.
|
||||
linker.postProcess()
|
||||
|
||||
return symbol
|
||||
}
|
||||
|
||||
@@ -70,8 +71,8 @@ open class IrPluginContext(
|
||||
|
||||
symbols.forEach { if (!it.isBound) linker.getDeclaration(it) }
|
||||
|
||||
// TODO: post process
|
||||
// linker.
|
||||
linker.postProcess()
|
||||
|
||||
return symbols
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ interface LazyIrProvider : IrProvider {
|
||||
|
||||
interface IrDeserializer : IrProvider {
|
||||
fun init(moduleFragment: IrModuleFragment?) {}
|
||||
fun postProcess() {}
|
||||
}
|
||||
|
||||
interface ReferenceSymbolTable {
|
||||
|
||||
+1
-1
@@ -537,7 +537,7 @@ abstract class KotlinIrLinker(
|
||||
deserializersForModules.values.forEach { it.init() }
|
||||
}
|
||||
|
||||
fun postProcess() {
|
||||
override fun postProcess() {
|
||||
deserializersForModules.values.forEach { it.postProcess() }
|
||||
finalizeExpectActualLinker()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user