[IR] Add KType to IrBuiltins

This commit is contained in:
Ivan Kylchik
2023-05-26 13:45:12 +02:00
committed by Space Team
parent 0021a5f655
commit 6f4f06757a
7 changed files with 13 additions and 5 deletions
@@ -37,11 +37,7 @@ class IrInterpreterEnvironment(
internal val kTypeParameterClass by lazy { irBuiltIns.kClassClass.getIrClassOfReflectionFromList("typeParameters")!! }
internal val kParameterClass by lazy { irBuiltIns.kFunctionClass.getIrClassOfReflectionFromList("parameters")!! }
internal val kTypeProjectionClass by lazy { kTypeClass.getIrClassOfReflectionFromList("arguments")!! }
internal val kTypeClass: IrClassSymbol by lazy {
// here we use fallback to `Any` because `KType` cannot be found on JS/Native by this way
// but still this class is used to represent type arguments in interpreter
irBuiltIns.kClassClass.getIrClassOfReflectionFromList("supertypes") ?: irBuiltIns.anyClass
}
internal val kTypeClass: IrClassSymbol by lazy { irBuiltIns.kTypeClass }
init {
mapOfObjects[irBuiltIns.unitClass] = Common(irBuiltIns.unitClass.owner)