[K2/N] Refactor KonanSymbols before re-enabling special backend checks
^KT-55598 Merge-request: KT-MR-9477 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
147a3331a4
commit
3cdf4bae07
+6
@@ -30,6 +30,7 @@ import org.jetbrains.kotlin.ir.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
|
||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl
|
||||
import org.jetbrains.kotlin.ir.types.*
|
||||
@@ -488,6 +489,11 @@ class IrBuiltInsOverDescriptors(
|
||||
symbolTable.referenceSimpleFunction(it)
|
||||
}
|
||||
|
||||
override fun findProperties(name: Name, packageFqName: FqName): Iterable<IrPropertySymbol> =
|
||||
builtIns.builtInsModule.getPackage(packageFqName).memberScope.getContributedVariables(name, NoLookupLocation.FROM_BACKEND).map {
|
||||
symbolTable.referenceProperty(it)
|
||||
}
|
||||
|
||||
override fun findClass(name: Name, vararg packageNameSegments: String): IrClassSymbol? =
|
||||
(builtInsPackage(*packageNameSegments).getContributedClassifier(
|
||||
name,
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.ir.declarations.IrExternalPackageFragment
|
||||
import org.jetbrains.kotlin.ir.declarations.IrFactory
|
||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||
import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -159,6 +160,7 @@ abstract class IrBuiltIns {
|
||||
// TODO: drop variants from segments, add helper from whole fqn
|
||||
abstract fun findFunctions(name: Name, vararg packageNameSegments: String = arrayOf("kotlin")): Iterable<IrSimpleFunctionSymbol>
|
||||
abstract fun findFunctions(name: Name, packageFqName: FqName): Iterable<IrSimpleFunctionSymbol>
|
||||
abstract fun findProperties(name: Name, packageFqName: FqName): Iterable<IrPropertySymbol>
|
||||
abstract fun findClass(name: Name, vararg packageNameSegments: String = arrayOf("kotlin")): IrClassSymbol?
|
||||
abstract fun findClass(name: Name, packageFqName: FqName): IrClassSymbol?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user