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