[FIR2IR] Use signature composer to read external callables

This commit is contained in:
Mikhail Glukhikh
2020-06-01 12:20:35 +03:00
parent 9ea69b4b3c
commit 8c422fbfc7
3 changed files with 24 additions and 8 deletions
@@ -633,6 +633,9 @@ open class SymbolTable(
override fun referenceProperty(descriptor: PropertyDescriptor): IrPropertySymbol =
propertySymbolTable.referenced(descriptor) { createPropertySymbol(descriptor) }
fun referencePropertyIfAny(sig: IdSignature): IrPropertySymbol? =
propertySymbolTable.get(sig)
override fun referencePropertyFromLinker(descriptor: PropertyDescriptor, sig: IdSignature): IrPropertySymbol =
propertySymbolTable.run {
if (sig.isPublic) referenced(sig) { IrPropertyPublicSymbolImpl(descriptor, sig) }
@@ -718,6 +721,9 @@ open class SymbolTable(
override fun referenceSimpleFunction(descriptor: FunctionDescriptor) =
simpleFunctionSymbolTable.referenced(descriptor) { createSimpleFunctionSymbol(descriptor) }
fun referenceSimpleFunctionIfAny(sig: IdSignature): IrSimpleFunctionSymbol? =
simpleFunctionSymbolTable.get(sig)
override fun referenceSimpleFunctionFromLinker(descriptor: FunctionDescriptor, sig: IdSignature): IrSimpleFunctionSymbol {
return simpleFunctionSymbolTable.run {
if (sig.isPublic) referenced(sig) { IrSimpleFunctionPublicSymbolImpl(descriptor, sig) } else