[JS IR BE] Merge native fixes into Ir Serializer
This commit is contained in:
+1
@@ -58,6 +58,7 @@ abstract class IrLazyDeclarationBase(
|
||||
|
||||
val containingDeclaration =
|
||||
((currentDescriptor as? PropertyAccessorDescriptor)?.correspondingProperty ?: currentDescriptor).containingDeclaration
|
||||
|
||||
return when (containingDeclaration) {
|
||||
is PackageFragmentDescriptor -> stubGenerator.generateOrGetEmptyExternalPackageFragmentStub(containingDeclaration).also {
|
||||
it.declarations.add(this)
|
||||
|
||||
@@ -15,9 +15,7 @@ import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
|
||||
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.IrExternalPackageFragmentSymbolImpl
|
||||
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
||||
import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||
import org.jetbrains.kotlin.ir.types.toIrType
|
||||
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
||||
import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||
@@ -98,8 +96,8 @@ class IrBuiltIns(
|
||||
builtIns.nothing to IrTypeMapper({ nothingType }, { nothingNType }),
|
||||
builtIns.unit to IrTypeMapper({ unitType }, { buildNullableType(unitType) }),
|
||||
builtIns.string to IrTypeMapper({ stringType }, { buildNullableType(stringType) }),
|
||||
builtIns.throwable to IrTypeMapper({ throwableType }, { buildNullableType(throwableType) })
|
||||
// builtIns.array to { arrayClass.owner.defaultType }
|
||||
builtIns.throwable to IrTypeMapper({ throwableType }, { buildNullableType(throwableType) }),
|
||||
builtIns.array to IrTypeMapper({ arrayType }, { buildNullableType(arrayType) })
|
||||
)
|
||||
|
||||
fun getPrimitiveTypeOrNullByDescriptor(descriptor: ClassifierDescriptor, isNullable: Boolean) =
|
||||
@@ -165,6 +163,7 @@ class IrBuiltIns(
|
||||
|
||||
val collectionClass by lazy { builtIns.collection.toIrSymbol() }
|
||||
|
||||
val arrayType by lazy { builtIns.array.toIrType(symbolTable = symbolTable) }
|
||||
val arrayClass by lazy { builtIns.array.toIrSymbol() }
|
||||
|
||||
val throwableType by lazy { builtIns.throwable.defaultType.toIrType() }
|
||||
|
||||
@@ -70,6 +70,7 @@ fun IrType.makeNullable(addKotlinType:Boolean = true) =
|
||||
else
|
||||
this
|
||||
|
||||
// TODO: get rid of this
|
||||
var irTypeKotlinBuiltIns: KotlinBuiltIns? = null
|
||||
|
||||
fun IrType.toKotlinType(): KotlinType {
|
||||
|
||||
Reference in New Issue
Block a user