[IR] Add new API into IrBuiltIns to access functional interfaces

This commit is contained in:
Roman Artemev
2020-04-20 14:25:33 +03:00
committed by romanart
parent a477aa7289
commit 3c50b47333
6 changed files with 16 additions and 4 deletions
@@ -138,6 +138,7 @@ fun generateKLib(
val psi2IrContext = runAnalysisAndPreparePsi2Ir(depsDescriptors)
val irBuiltIns = psi2IrContext.irBuiltIns
val functionFactory = IrFunctionFactory(irBuiltIns, psi2IrContext.symbolTable)
irBuiltIns.functionFactory = functionFactory
val expectDescriptorToSymbol = mutableMapOf<DeclarationDescriptor, IrSymbol>()
@@ -211,6 +212,7 @@ fun loadIr(
val irBuiltIns = psi2IrContext.irBuiltIns
val symbolTable = psi2IrContext.symbolTable
val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable)
irBuiltIns.functionFactory = functionFactory
val irLinker = JsIrLinker(psi2IrContext.moduleDescriptor, emptyLoggingContext, irBuiltIns, symbolTable, functionFactory, null)
@@ -253,6 +255,7 @@ fun loadIr(
irLinker.deserializeIrModuleHeader(depsDescriptors.getModuleDescriptor(it), it, strategy)
}
irBuiltIns.functionFactory = functionFactory
val moduleFragment = deserializedModuleFragments.last()