Minor, rename IrBuiltIns.IrTypeMapper -> BuiltInIrTypePair

To avoid name clash with the new IrTypeMapper in JVM backend
This commit is contained in:
Alexander Udalov
2019-05-14 18:37:12 +02:00
parent f9a1e582b2
commit 15e0fd93bd
@@ -130,27 +130,27 @@ class IrBuiltIns(
val throwableType = builtIns.throwable.defaultType.toIrType() val throwableType = builtIns.throwable.defaultType.toIrType()
val throwableClass = builtIns.throwable.toIrSymbol() val throwableClass = builtIns.throwable.toIrSymbol()
private class IrTypeMapper(val type: IrType) { private class BuiltInIrTypePair(val type: IrType) {
val nType: IrType = with(type as IrSimpleType) { val nType: IrType = with(type as IrSimpleType) {
IrSimpleTypeImpl(classifier, true, arguments, annotations) IrSimpleTypeImpl(classifier, true, arguments, annotations)
} }
} }
private val primitiveTypesMapping = mapOf( private val primitiveTypesMapping = mapOf(
builtIns.any to IrTypeMapper(anyType), builtIns.any to BuiltInIrTypePair(anyType),
builtIns.boolean to IrTypeMapper(booleanType), builtIns.boolean to BuiltInIrTypePair(booleanType),
builtIns.char to IrTypeMapper(charType), builtIns.char to BuiltInIrTypePair(charType),
builtIns.number to IrTypeMapper(numberType), builtIns.number to BuiltInIrTypePair(numberType),
builtIns.byte to IrTypeMapper(byteType), builtIns.byte to BuiltInIrTypePair(byteType),
builtIns.short to IrTypeMapper(shortType), builtIns.short to BuiltInIrTypePair(shortType),
builtIns.int to IrTypeMapper(intType), builtIns.int to BuiltInIrTypePair(intType),
builtIns.long to IrTypeMapper(longType), builtIns.long to BuiltInIrTypePair(longType),
builtIns.float to IrTypeMapper(floatType), builtIns.float to BuiltInIrTypePair(floatType),
builtIns.double to IrTypeMapper(doubleType), builtIns.double to BuiltInIrTypePair(doubleType),
builtIns.nothing to IrTypeMapper(nothingType), builtIns.nothing to BuiltInIrTypePair(nothingType),
builtIns.unit to IrTypeMapper(unitType), builtIns.unit to BuiltInIrTypePair(unitType),
builtIns.string to IrTypeMapper(stringType), builtIns.string to BuiltInIrTypePair(stringType),
builtIns.throwable to IrTypeMapper(throwableType) builtIns.throwable to BuiltInIrTypePair(throwableType)
) )
fun getPrimitiveTypeOrNullByDescriptor(descriptor: ClassifierDescriptor, isNullable: Boolean) = fun getPrimitiveTypeOrNullByDescriptor(descriptor: ClassifierDescriptor, isNullable: Boolean) =