JVM_IR don't use Intrinsics.stringPlus for 2-argument concatenation
This commit is contained in:
committed by
TeamCityServer
parent
8a459821d0
commit
7e86f5dcd9
-7
@@ -147,13 +147,6 @@ private class JvmStringConcatenationLowering(val context: JvmBackendContext) : F
|
||||
arguments.size == 1 ->
|
||||
lowerInlineClassArgument(arguments[0]) ?: callToString(arguments[0].unwrapImplicitNotNull())
|
||||
|
||||
arguments.size == 2 && arguments[0].type.isStringClassType() ->
|
||||
irCall(backendContext.ir.symbols.intrinsicStringPlus).apply {
|
||||
putValueArgument(0, lowerInlineClassArgument(arguments[0]) ?: arguments[0].unwrapImplicitNotNull())
|
||||
// Unwrapping IMPLICIT_NOTNULL is not strictly necessary on 2nd argument (parameter type is `Any?`)
|
||||
putValueArgument(1, lowerInlineClassArgument(arguments[1]) ?: arguments[1])
|
||||
}
|
||||
|
||||
arguments.size < MAX_STRING_CONCAT_DEPTH -> {
|
||||
irCall(toStringFunction).apply {
|
||||
dispatchReceiver = appendWindow(arguments, irCall(constructor))
|
||||
|
||||
@@ -177,9 +177,6 @@ class JvmSymbols(
|
||||
override val throwKotlinNothingValueException: IrSimpleFunctionSymbol =
|
||||
intrinsicsClass.functions.single { it.owner.name.asString() == "throwKotlinNothingValueException" }
|
||||
|
||||
val intrinsicStringPlus: IrFunctionSymbol =
|
||||
intrinsicsClass.functions.single { it.owner.name.asString() == "stringPlus" }
|
||||
|
||||
val intrinsicsKotlinClass: IrClassSymbol =
|
||||
(intrinsicsClass.owner.declarations.single { it is IrClass && it.name.asString() == "Kotlin" } as IrClass).symbol
|
||||
|
||||
|
||||
Reference in New Issue
Block a user