Add possibility to interpret and fold IrStringConcatenation expression

This commit is contained in:
Ivan Kylchik
2023-02-09 12:29:27 +01:00
committed by Space Team
parent 7cf9dda8dc
commit 63b340651d
77 changed files with 305 additions and 184 deletions
@@ -21229,6 +21229,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/modifiers/const/stdlibConstFun.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
@@ -21229,6 +21229,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/modifiers/const/stdlibConstFun.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
@@ -21235,6 +21235,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/modifiers/const/stdlibConstFun.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
@@ -79,7 +79,7 @@ internal fun checkConstantArguments(
if (exp is FirResolvedQualifier) {
return ConstantArgumentKind.NOT_CONST
}
checkConstantArguments(exp, session).let { return it }
checkConstantArguments(exp, session)?.let { return it }
}
}
expression is FirGetClassCall -> {
@@ -28388,6 +28388,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -28388,6 +28388,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -398,7 +398,10 @@ private fun unfoldStringConcatenation(expression: IrStringConcatenation, environ
is Primitive<*> -> {
// This block is not really needed, but this way it is easier to handle `toString` with `treatFloatInSpecialWay` enabled.
callStack.popState()
val toStringCall = IrCallImpl.fromSymbolOwner(UNDEFINED_OFFSET, UNDEFINED_OFFSET, environment.irBuiltIns.memberToString)
val toStringCall = IrCallImpl.fromSymbolOwner(
UNDEFINED_OFFSET, UNDEFINED_OFFSET,
if (state.isNull()) environment.irBuiltIns.extensionToString else environment.irBuiltIns.memberToString
)
callStack.pushSimpleInstruction(toStringCall)
callStack.pushState(state)
}
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.ir.declarations.IrField
import org.jetbrains.kotlin.ir.declarations.IrFile
import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.expressions.impl.IrConstImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrStringConcatenationImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrVarargImpl
import org.jetbrains.kotlin.ir.interpreter.IrInterpreter
import org.jetbrains.kotlin.ir.interpreter.IrInterpreterConfiguration
@@ -21,6 +22,8 @@ import org.jetbrains.kotlin.ir.interpreter.toIrConst
import org.jetbrains.kotlin.ir.types.*
import org.jetbrains.kotlin.ir.util.dump
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
import kotlin.math.max
import kotlin.math.min
class IrConstTransformer(
private val interpreter: IrInterpreter,
@@ -100,6 +103,56 @@ class IrConstTransformer(
return super.visitField(declaration)
}
override fun visitStringConcatenation(expression: IrStringConcatenation): IrExpression {
fun IrExpression.wrapInStringConcat(): IrExpression = IrStringConcatenationImpl(
this.startOffset, this.endOffset, expression.type, listOf(this@wrapInStringConcat)
)
fun IrExpression.wrapInToStringConcatAndInterpret(): IrExpression = wrapInStringConcat().interpret(failAsError = false)
// here `StringBuilder`'s list is used to optimize memory, everything works without it
val folded = mutableListOf<IrExpression>()
val buildersList = mutableListOf<StringBuilder>()
for (next in expression.arguments) {
val last = folded.lastOrNull()
when {
!next.wrapInStringConcat().canBeInterpreted() -> {
folded += next
buildersList.add(StringBuilder())
}
last == null || !last.wrapInStringConcat().canBeInterpreted() -> {
val result = next.wrapInToStringConcatAndInterpret()
folded += result
buildersList.add(StringBuilder((result as? IrConst<*>)?.value?.toString() ?: ""))
}
else -> {
val nextAsConst = next.wrapInToStringConcatAndInterpret()
if (nextAsConst !is IrConst<*>) {
folded += next
buildersList.add(StringBuilder())
} else {
folded[folded.size - 1] = IrConstImpl.string(
// Inlined strings may have `last.startOffset > next.endOffset`
min(last.startOffset, next.startOffset), max(last.endOffset, next.endOffset), expression.type, ""
)
buildersList.last().append(nextAsConst.value.toString())
}
}
}
}
val foldedConst = folded.singleOrNull() as? IrConst<*>
if (foldedConst != null) {
return IrConstImpl.string(expression.startOffset, expression.endOffset, expression.type, buildersList.single().toString())
}
folded.zip(buildersList).forEach {
@Suppress("UNCHECKED_CAST")
(it.first as? IrConst<String>)?.value = it.second.toString()
}
return IrStringConcatenationImpl(expression.startOffset, expression.endOffset, expression.type, folded)
}
override fun visitDeclaration(declaration: IrDeclarationBase): IrStatement {
transformAnnotations(declaration)
return super.visitDeclaration(declaration)
@@ -0,0 +1,16 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// WITH_STDLIB
const val simple = "O${'K'} ${1.toLong() + 2.5}"
const val withInnerConcatenation = "1 ${"2 ${3} ${4} 5"} 6"
const val withNull = "1 ${null}" // but `"1" + null` is invalid
fun box(): String {
if (simple != "OK 3.5") return "Fail 1"
if (withInnerConcatenation != "1 2 3 4 5 6") return "Fail 2"
if (withNull != "1 null") return "Fail 3"
return "OK"
}
@@ -104,8 +104,7 @@ FILE fqName:<root> fileName:/recordWithCompanion.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Tag'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Tag("
CONST String type=kotlin.String value="id="
CONST String type=kotlin.String value="Tag(id="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Tag declared in <root>.Tag.toString' type=<root>.Tag origin=null
CONST String type=kotlin.String value=")"
@@ -1,19 +0,0 @@
package test
annotation class Ann(
val s1: String,
val s2: String,
val s3: String,
val s4: String
)
val i = 1
@Ann(
s1 = "a$i",
s2 = "a$i b",
s3 = <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>"$i"<!>,
s4 = "a${i}a$i"
) class MyClass
// EXPECTED: @Ann(s1 = "a1", s2 = "a1 b", s3 = "1", s4 = "a1a1")
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package test
annotation class Ann(
@@ -1,9 +0,0 @@
package test
annotation class Ann(val s1: String, val s2: String)
val i = 1
@Ann(s1 = "a" + "b", s2 = "a" + "a$i") class MyClass
// EXPECTED: @Ann(s1 = "ab", s2 = "aa1")
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package test
annotation class Ann(val s1: String, val s2: String)
@@ -0,0 +1,16 @@
const val simple = "O${'K'} ${1.toLong() + 2.0}"
const val withInnerConcatenation = "1 ${"2 ${3} ${4} 5"} 6"
object A
object B {
override fun toString(): String = "B"
}
const val printA = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"A: $A"<!>
const val printB = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"B: $B"<!>
const val withNull = "1 ${null}"
const val withNullPlus = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"1" + null<!>
val nonConst = 0
const val withNonConst = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"A $nonConst B"<!>
@@ -0,0 +1,16 @@
const val simple = "O${'K'} ${1.toLong() + 2.0}"
const val withInnerConcatenation = "1 ${"2 ${3} ${4} 5"} 6"
object A
object B {
override fun toString(): String = "B"
}
const val printA = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"A: $A"<!>
const val printB = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"B: $B"<!>
const val withNull = "1 ${null}"
const val withNullPlus = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>"1" + null<!>
val nonConst = 0
const val withNonConst = <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>"A $nonConst B"<!>
@@ -0,0 +1,24 @@
package
public val nonConst: kotlin.Int = 0
public const val printA: kotlin.String
public const val printB: kotlin.String
public const val simple: kotlin.String = "OK 3.0"
public const val withInnerConcatenation: kotlin.String = "1 2 3 4 5 6"
public const val withNonConst: kotlin.String = "A 0 B"
public const val withNull: kotlin.String = "1 null"
public const val withNullPlus: kotlin.String
public object A {
private constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public object B {
private constructor B()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ fun toString(): kotlin.String
}
@@ -413,48 +413,39 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test1'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test1("
CONST String type=kotlin.String value="stringArray="
CONST String type=kotlin.String value="Test1(stringArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:stringArray type:kotlin.Array<kotlin.String> visibility:private [final]' type=kotlin.Array<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="charArray="
CONST String type=kotlin.String value=", charArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:charArray type:kotlin.CharArray visibility:private [final]' type=kotlin.CharArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="booleanArray="
CONST String type=kotlin.String value=", booleanArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:booleanArray type:kotlin.BooleanArray visibility:private [final]' type=kotlin.BooleanArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="byteArray="
CONST String type=kotlin.String value=", byteArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:byteArray type:kotlin.ByteArray visibility:private [final]' type=kotlin.ByteArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="shortArray="
CONST String type=kotlin.String value=", shortArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:shortArray type:kotlin.ShortArray visibility:private [final]' type=kotlin.ShortArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="intArray="
CONST String type=kotlin.String value=", intArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:intArray type:kotlin.IntArray visibility:private [final]' type=kotlin.IntArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="longArray="
CONST String type=kotlin.String value=", longArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:longArray type:kotlin.LongArray visibility:private [final]' type=kotlin.LongArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="floatArray="
CONST String type=kotlin.String value=", floatArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:floatArray type:kotlin.FloatArray visibility:private [final]' type=kotlin.FloatArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="doubleArray="
CONST String type=kotlin.String value=", doubleArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:doubleArray type:kotlin.DoubleArray visibility:private [final]' type=kotlin.DoubleArray origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
@@ -545,8 +536,7 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test2'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test2("
CONST String type=kotlin.String value="genericArray="
CONST String type=kotlin.String value="Test2(genericArray="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:genericArray type:kotlin.Array<T of <root>.Test2> visibility:private [final]' type=kotlin.Array<T of <root>.Test2> origin=null
receiver: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.toString' type=<root>.Test2<T of <root>.Test2> origin=null
@@ -644,8 +634,7 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test3'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test3("
CONST String type=kotlin.String value="anyArrayN="
CONST String type=kotlin.String value="Test3(anyArrayN="
CALL 'public final fun dataClassArrayMemberToString (arg0: kotlin.Any?): kotlin.String declared in kotlin.internal.ir' type=kotlin.String origin=null
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anyArrayN type:kotlin.Array<kotlin.Any>? visibility:private [final]' type=kotlin.Array<kotlin.Any>? origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.toString' type=<root>.Test3 origin=null
@@ -133,7 +133,7 @@ data class Test1 {
}
override fun toString(): String {
return "Test1(" + "stringArray=" + dataClassArrayMemberToString(arg0 = <this>.#stringArray) + ", " + "charArray=" + dataClassArrayMemberToString(arg0 = <this>.#charArray) + ", " + "booleanArray=" + dataClassArrayMemberToString(arg0 = <this>.#booleanArray) + ", " + "byteArray=" + dataClassArrayMemberToString(arg0 = <this>.#byteArray) + ", " + "shortArray=" + dataClassArrayMemberToString(arg0 = <this>.#shortArray) + ", " + "intArray=" + dataClassArrayMemberToString(arg0 = <this>.#intArray) + ", " + "longArray=" + dataClassArrayMemberToString(arg0 = <this>.#longArray) + ", " + "floatArray=" + dataClassArrayMemberToString(arg0 = <this>.#floatArray) + ", " + "doubleArray=" + dataClassArrayMemberToString(arg0 = <this>.#doubleArray) + ")"
return "Test1(stringArray=" + dataClassArrayMemberToString(arg0 = <this>.#stringArray) + ", charArray=" + dataClassArrayMemberToString(arg0 = <this>.#charArray) + ", booleanArray=" + dataClassArrayMemberToString(arg0 = <this>.#booleanArray) + ", byteArray=" + dataClassArrayMemberToString(arg0 = <this>.#byteArray) + ", shortArray=" + dataClassArrayMemberToString(arg0 = <this>.#shortArray) + ", intArray=" + dataClassArrayMemberToString(arg0 = <this>.#intArray) + ", longArray=" + dataClassArrayMemberToString(arg0 = <this>.#longArray) + ", floatArray=" + dataClassArrayMemberToString(arg0 = <this>.#floatArray) + ", doubleArray=" + dataClassArrayMemberToString(arg0 = <this>.#doubleArray) + ")"
}
}
@@ -176,7 +176,7 @@ data class Test2<T : Any?> {
}
override fun toString(): String {
return "Test2(" + "genericArray=" + dataClassArrayMemberToString(arg0 = <this>.#genericArray) + ")"
return "Test2(genericArray=" + dataClassArrayMemberToString(arg0 = <this>.#genericArray) + ")"
}
}
@@ -222,7 +222,7 @@ data class Test3 {
}
override fun toString(): String {
return "Test3(" + "anyArrayN=" + dataClassArrayMemberToString(arg0 = <this>.#anyArrayN) + ")"
return "Test3(anyArrayN=" + dataClassArrayMemberToString(arg0 = <this>.#anyArrayN) + ")"
}
}
@@ -167,16 +167,13 @@ FILE fqName:<root> fileName:/dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test1'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test1("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test1(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="y="
CONST String type=kotlin.String value=", y="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="z="
CONST String type=kotlin.String value=", z="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
receiver: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.toString' type=<root>.Test1 origin=null
CONST String type=kotlin.String value=")"
@@ -273,8 +270,7 @@ FILE fqName:<root> fileName:/dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test2'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test2("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test2(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null
receiver: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.toString' type=<root>.Test2 origin=null
CONST String type=kotlin.String value=")"
@@ -505,20 +501,16 @@ FILE fqName:<root> fileName:/dataClasses.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test3'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test3("
CONST String type=kotlin.String value="d="
CONST String type=kotlin.String value="Test3(d="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d type:kotlin.Double visibility:private [final]' type=kotlin.Double origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.toString' type=<root>.Test3 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="dn="
CONST String type=kotlin.String value=", dn="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:dn type:kotlin.Double? visibility:private [final]' type=kotlin.Double? origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.toString' type=<root>.Test3 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="f="
CONST String type=kotlin.String value=", f="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:f type:kotlin.Float visibility:private [final]' type=kotlin.Float origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.toString' type=<root>.Test3 origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="df="
CONST String type=kotlin.String value=", df="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:df type:kotlin.Float? visibility:private [final]' type=kotlin.Float? origin=null
receiver: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.toString' type=<root>.Test3 origin=null
CONST String type=kotlin.String value=")"
@@ -61,7 +61,7 @@ data class Test1 {
}
override fun toString(): String {
return "Test1(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ", " + "z=" + <this>.#z + ")"
return "Test1(x=" + <this>.#x + ", y=" + <this>.#y + ", z=" + <this>.#z + ")"
}
}
@@ -107,7 +107,7 @@ data class Test2 {
}
override fun toString(): String {
return "Test2(" + "x=" + <this>.#x + ")"
return "Test2(x=" + <this>.#x + ")"
}
}
@@ -193,7 +193,7 @@ data class Test3 {
}
override fun toString(): String {
return "Test3(" + "d=" + <this>.#d + ", " + "dn=" + <this>.#dn + ", " + "f=" + <this>.#f + ", " + "df=" + <this>.#df + ")"
return "Test3(d=" + <this>.#d + ", dn=" + <this>.#dn + ", f=" + <this>.#f + ", df=" + <this>.#df + ")"
}
}
@@ -94,8 +94,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test1'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test1("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test1(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test1 visibility:private [final]' type=T of <root>.Test1 origin=null
receiver: GET_VAR '<this>: <root>.Test1<T of <root>.Test1> declared in <root>.Test1.toString' type=<root>.Test1<T of <root>.Test1> origin=null
CONST String type=kotlin.String value=")"
@@ -185,8 +184,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test2'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test2("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test2(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test2 visibility:private [final]' type=T of <root>.Test2 origin=null
receiver: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.toString' type=<root>.Test2<T of <root>.Test2> origin=null
CONST String type=kotlin.String value=")"
@@ -276,8 +274,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test3'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test3("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test3(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<T of <root>.Test3> visibility:private [final]' type=kotlin.collections.List<T of <root>.Test3> origin=null
receiver: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.toString' type=<root>.Test3<T of <root>.Test3> origin=null
CONST String type=kotlin.String value=")"
@@ -365,8 +362,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test4'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test4("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test4(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<kotlin.String> visibility:private [final]' type=kotlin.collections.List<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.toString' type=<root>.Test4 origin=null
CONST String type=kotlin.String value=")"
@@ -39,7 +39,7 @@ data class Test1<T : Any?> {
}
override fun toString(): String {
return "Test1(" + "x=" + <this>.#x + ")"
return "Test1(x=" + <this>.#x + ")"
}
}
@@ -82,7 +82,7 @@ data class Test2<T : Number> {
}
override fun toString(): String {
return "Test2(" + "x=" + <this>.#x + ")"
return "Test2(x=" + <this>.#x + ")"
}
}
@@ -125,7 +125,7 @@ data class Test3<T : Any?> {
}
override fun toString(): String {
return "Test3(" + "x=" + <this>.#x + ")"
return "Test3(x=" + <this>.#x + ")"
}
}
@@ -168,7 +168,7 @@ data class Test4 {
}
override fun toString(): String {
return "Test4(" + "x=" + <this>.#x + ")"
return "Test4(x=" + <this>.#x + ")"
}
}
@@ -132,8 +132,7 @@ FILE fqName:<root> fileName:/delegationInSealed.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A.B'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="B("
CONST String type=kotlin.String value="c="
CONST String type=kotlin.String value="B(c="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:kotlin.CharSequence visibility:private [final]' type=kotlin.CharSequence origin=null
receiver: GET_VAR '<this>: <root>.A.B declared in <root>.A.B.toString' type=<root>.A.B origin=null
CONST String type=kotlin.String value=")"
@@ -56,7 +56,7 @@ sealed class A : CharSequence {
}
override fun toString(): String {
return "B(" + "c=" + <this>.#c + ")"
return "B(c=" + <this>.#c + ")"
}
}
@@ -92,8 +92,7 @@ FILE fqName:<root> fileName:/kt31649.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.TestData'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="TestData("
CONST String type=kotlin.String value="nn="
CONST String type=kotlin.String value="TestData(nn="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null
receiver: GET_VAR '<this>: <root>.TestData declared in <root>.TestData.toString' type=<root>.TestData origin=null
CONST String type=kotlin.String value=")"
@@ -167,8 +166,7 @@ FILE fqName:<root> fileName:/kt31649.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.TestInline'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="TestInline("
CONST String type=kotlin.String value="nn="
CONST String type=kotlin.String value="TestInline(nn="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:nn type:kotlin.Nothing? visibility:private [final]' type=kotlin.Nothing? origin=null
receiver: GET_VAR '<this>: <root>.TestInline declared in <root>.TestInline.toString' type=<root>.TestInline origin=null
CONST String type=kotlin.String value=")"
@@ -39,7 +39,7 @@ data class TestData {
}
override fun toString(): String {
return "TestData(" + "nn=" + <this>.#nn + ")"
return "TestData(nn=" + <this>.#nn + ")"
}
}
@@ -74,7 +74,7 @@ value class TestInline {
}
override fun toString(): String {
return "TestInline(" + "nn=" + <this>.#nn + ")"
return "TestInline(nn=" + <this>.#nn + ")"
}
}
@@ -91,8 +91,7 @@ FILE fqName:<root> fileName:/kt49936.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="A("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="A(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.toString' type=<root>.A origin=null
CONST String type=kotlin.String value=")"
@@ -91,8 +91,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="A("
CONST String type=kotlin.String value="runA="
CONST String type=kotlin.String value="A(runA="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:runA type:@[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> visibility:private [final]' type=@[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.toString' type=<root>.A origin=null
CONST String type=kotlin.String value=")"
@@ -202,8 +201,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.B'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="B("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="B(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
receiver: GET_VAR '<this>: <root>.B declared in <root>.B.toString' type=<root>.B origin=null
CONST String type=kotlin.String value=")"
@@ -39,7 +39,7 @@ data class A {
}
override fun toString(): String {
return "A(" + "runA=" + <this>.#runA + ")"
return "A(runA=" + <this>.#runA + ")"
}
}
@@ -93,7 +93,7 @@ data class B {
}
override fun toString(): String {
return "B(" + "x=" + <this>.#x + ")"
return "B(x=" + <this>.#x + ")"
}
}
@@ -128,12 +128,10 @@ FILE fqName:<root> fileName:/openDataClass.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.ValidatedProperties'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="ValidatedProperties("
CONST String type=kotlin.String value="test1="
CONST String type=kotlin.String value="ValidatedProperties(test1="
CALL 'public open fun <get-test1> (): kotlin.String declared in <root>.ValidatedProperties' type=kotlin.String origin=null
$this: GET_VAR '<this>: <root>.ValidatedProperties declared in <root>.ValidatedProperties.toString' type=<root>.ValidatedProperties origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="test2="
CONST String type=kotlin.String value=", test2="
CALL 'public open fun <get-test2> (): kotlin.String declared in <root>.ValidatedProperties' type=kotlin.String origin=null
$this: GET_VAR '<this>: <root>.ValidatedProperties declared in <root>.ValidatedProperties.toString' type=<root>.ValidatedProperties origin=null
CONST String type=kotlin.String value=")"
@@ -50,7 +50,7 @@ open data class ValidatedProperties {
}
override fun toString(): String {
return "ValidatedProperties(" + "test1=" + <this>.<get-test1>() + ", " + "test2=" + <this>.<get-test2>() + ")"
return "ValidatedProperties(test1=" + <this>.<get-test1>() + ", test2=" + <this>.<get-test2>() + ")"
}
}
+1 -2
View File
@@ -60,8 +60,7 @@ FILE fqName:<root> fileName:/inlineClass.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Test declared in <root>.Test.toString' type=<root>.Test origin=null
CONST String type=kotlin.String value=")"
+1 -1
View File
@@ -25,7 +25,7 @@ value class Test {
}
override fun toString(): String {
return "Test(" + "x=" + <this>.#x + ")"
return "Test(x=" + <this>.#x + ")"
}
}
@@ -105,8 +105,7 @@ FILE fqName:<root> fileName:/inlineClassSyntheticMethods.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.IC'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="IC("
CONST String type=kotlin.String value="c="
CONST String type=kotlin.String value="IC(c="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:c type:<root>.C<TT of <root>.IC> visibility:private [final]' type=<root>.C<TT of <root>.IC> origin=null
receiver: GET_VAR '<this>: <root>.IC<TT of <root>.IC> declared in <root>.IC.toString' type=<root>.IC<TT of <root>.IC> origin=null
CONST String type=kotlin.String value=")"
@@ -46,7 +46,7 @@ value class IC<TT : Any?> {
}
override fun toString(): String {
return "IC(" + "c=" + <this>.#c + ")"
return "IC(c=" + <this>.#c + ")"
}
}
@@ -91,8 +91,7 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="i="
CONST String type=kotlin.String value="MyContainer(i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
@@ -37,7 +37,7 @@ data class MyContainer {
}
override fun toString(): String {
return "MyContainer(" + "i=" + <this>.#i + ")"
return "MyContainer(i=" + <this>.#i + ")"
}
}
@@ -91,8 +91,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyContainer'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyContainer("
CONST String type=kotlin.String value="s="
CONST String type=kotlin.String value="MyContainer(s="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.toString' type=<root>.MyContainer origin=null
CONST String type=kotlin.String value=")"
@@ -37,7 +37,7 @@ data class MyContainer {
}
override fun toString(): String {
return "MyContainer(" + "s=" + <this>.#s + ")"
return "MyContainer(s=" + <this>.#s + ")"
}
}
@@ -91,8 +91,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
CONST String type=kotlin.String value="Result(i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
@@ -37,7 +37,7 @@ data class Result {
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
return "Result(i=" + <this>.#i + ")"
}
}
@@ -148,12 +148,10 @@ FILE fqName:<root> fileName:/compareTo.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Pair'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Pair("
CONST String type=kotlin.String value="first="
CONST String type=kotlin.String value="Pair(first="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:first type:A of <root>.Pair visibility:private [final]' type=A of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="second="
CONST String type=kotlin.String value=", second="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:second type:B of <root>.Pair visibility:private [final]' type=B of <root>.Pair origin=null
receiver: GET_VAR '<this>: <root>.Pair<A of <root>.Pair, B of <root>.Pair> declared in <root>.Pair.toString' type=<root>.Pair<A of <root>.Pair, B of <root>.Pair> origin=null
CONST String type=kotlin.String value=")"
@@ -55,7 +55,7 @@ data class Pair<A : Any?, B : Any?> {
}
override fun toString(): String {
return "Pair(" + "first=" + <this>.#first + ", " + "second=" + <this>.#second + ")"
return "Pair(first=" + <this>.#first + ", second=" + <this>.#second + ")"
}
}
@@ -93,8 +93,7 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Counter'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Counter("
CONST String type=kotlin.String value="i="
CONST String type=kotlin.String value="Counter(i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Counter declared in <root>.Counter.toString' type=<root>.Counter origin=null
CONST String type=kotlin.String value=")"
@@ -184,8 +183,7 @@ FILE fqName:<root> fileName:/iteratorOperator.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.CounterConfig'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="CounterConfig("
CONST String type=kotlin.String value="max="
CONST String type=kotlin.String value="CounterConfig(max="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:max type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.CounterConfig declared in <root>.CounterConfig.toString' type=<root>.CounterConfig origin=null
CONST String type=kotlin.String value=")"
@@ -37,7 +37,7 @@ data class Counter {
}
override fun toString(): String {
return "Counter(" + "i=" + <this>.#i + ")"
return "Counter(i=" + <this>.#i + ")"
}
}
@@ -80,7 +80,7 @@ data class CounterConfig {
}
override fun toString(): String {
return "CounterConfig(" + "max=" + <this>.#max + ")"
return "CounterConfig(max=" + <this>.#max + ")"
}
}
@@ -83,8 +83,7 @@ FILE fqName:<root> fileName:/unaryOperators.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Result'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Result("
CONST String type=kotlin.String value="i="
CONST String type=kotlin.String value="Result(i="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:i type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.Result declared in <root>.Result.toString' type=<root>.Result origin=null
CONST String type=kotlin.String value=")"
@@ -36,7 +36,7 @@ data class Result {
}
override fun toString(): String {
return "Result(" + "i=" + <this>.#i + ")"
return "Result(i=" + <this>.#i + ")"
}
}
@@ -60,8 +60,7 @@ FILE fqName:<root> fileName:/inlineCollectionOfInlineClass.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.IT'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="IT("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="IT(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.IT declared in <root>.IT.toString' type=<root>.IT origin=null
CONST String type=kotlin.String value=")"
@@ -242,8 +241,7 @@ FILE fqName:<root> fileName:/inlineCollectionOfInlineClass.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.InlineMutableSet'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="InlineMutableSet("
CONST String type=kotlin.String value="ms="
CONST String type=kotlin.String value="InlineMutableSet(ms="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ms type:kotlin.collections.MutableSet<<root>.IT> visibility:private [final]' type=kotlin.collections.MutableSet<<root>.IT> origin=null
receiver: GET_VAR '<this>: <root>.InlineMutableSet declared in <root>.InlineMutableSet.toString' type=<root>.InlineMutableSet origin=null
CONST String type=kotlin.String value=")"
@@ -25,7 +25,7 @@ value class IT {
}
override fun toString(): String {
return "IT(" + "x=" + <this>.#x + ")"
return "IT(x=" + <this>.#x + ")"
}
}
@@ -102,7 +102,7 @@ value class InlineMutableSet : MutableSet<IT> {
}
override fun toString(): String {
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
return "InlineMutableSet(ms=" + <this>.#ms + ")"
}
}
@@ -85,8 +85,7 @@ FILE fqName:<root> fileName:/dataClassWithJvmRecord.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.MyRec'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="MyRec("
CONST String type=kotlin.String value="name="
CONST String type=kotlin.String value="MyRec(name="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:name type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyRec declared in <root>.MyRec.toString' type=<root>.MyRec origin=null
CONST String type=kotlin.String value=")"
@@ -37,7 +37,7 @@ data class MyRec : Record {
}
override fun toString(): String {
return "MyRec(" + "name=" + <this>.#name + ")"
return "MyRec(name=" + <this>.#name + ")"
}
}
@@ -117,8 +117,7 @@ FILE fqName:<root> fileName:/kt52677.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.LoginSuccessPacket'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="LoginSuccessPacket("
CONST String type=kotlin.String value="id="
CONST String type=kotlin.String value="LoginSuccessPacket(id="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:id type:@[MySerializable(c = ...)] <root>.Uuid1 visibility:private [final]' type=@[MySerializable(c = CLASS_REFERENCE 'CLASS OBJECT name:UuidSerializer modality:FINAL visibility:public superTypes:[<root>.MySerializer<@[MySerializable(c = ...)] <root>.Uuid1>]' type=kotlin.reflect.KClass<<root>.UuidSerializer>)] <root>.Uuid1 origin=null
receiver: GET_VAR '<this>: <root>.LoginSuccessPacket declared in <root>.LoginSuccessPacket.toString' type=<root>.LoginSuccessPacket origin=null
CONST String type=kotlin.String value=")"
@@ -51,7 +51,7 @@ data class LoginSuccessPacket {
}
override fun toString(): String {
return "LoginSuccessPacket(" + "id=" + <this>.#id + ")"
return "LoginSuccessPacket(id=" + <this>.#id + ")"
}
}
@@ -139,12 +139,10 @@ FILE fqName:<root> fileName:/dataClassMembers.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Test'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Test("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="Test(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test visibility:private [final]' type=T of <root>.Test origin=null
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.toString' type=<root>.Test<T of <root>.Test> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="y="
CONST String type=kotlin.String value=", y="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.toString' type=<root>.Test<T of <root>.Test> origin=null
CONST String type=kotlin.String value=")"
@@ -52,7 +52,7 @@ data class Test<T : Any?> {
}
override fun toString(): String {
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
return "Test(x=" + <this>.#x + ", y=" + <this>.#y + ")"
}
}
@@ -824,12 +824,10 @@ FILE fqName:<root> fileName:/ArrayMap.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.ArrayMapImpl.Entry'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Entry("
CONST String type=kotlin.String value="key="
CONST String type=kotlin.String value="Entry(key="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:key type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> declared in <root>.ArrayMapImpl.Entry.toString' type=<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="value="
CONST String type=kotlin.String value=", value="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.ArrayMapImpl.Entry visibility:private [final]' type=T of <root>.ArrayMapImpl.Entry origin=null
receiver: GET_VAR '<this>: <root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> declared in <root>.ArrayMapImpl.Entry.toString' type=<root>.ArrayMapImpl.Entry<T of <root>.ArrayMapImpl.Entry> origin=null
CONST String type=kotlin.String value=")"
@@ -320,7 +320,7 @@ internal class ArrayMapImpl<T : Any> : ArrayMap<T> {
}
override fun toString(): String {
return "Entry(" + "key=" + <this>.#key + ", " + "value=" + <this>.#value + ")"
return "Entry(key=" + <this>.#key + ", value=" + <this>.#value + ")"
}
}
@@ -94,8 +94,7 @@ FILE fqName:<root> fileName:/MultiList.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Some'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Some("
CONST String type=kotlin.String value="value="
CONST String type=kotlin.String value="Some(value="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.Some visibility:private [final]' type=T of <root>.Some origin=null
receiver: GET_VAR '<this>: <root>.Some<T of <root>.Some> declared in <root>.Some.toString' type=<root>.Some<T of <root>.Some> origin=null
CONST String type=kotlin.String value=")"
@@ -39,7 +39,7 @@ data class Some<T : Any?> {
}
override fun toString(): String {
return "Some(" + "value=" + <this>.#value + ")"
return "Some(value=" + <this>.#value + ")"
}
}
@@ -176,8 +176,7 @@ FILE fqName:<root> fileName:/SignatureClash.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.DataClass'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="DataClass("
CONST String type=kotlin.String value="delegate="
CONST String type=kotlin.String value="DataClass(delegate="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:delegate type:<root>.Delegate visibility:private [final]' type=<root>.Delegate origin=null
receiver: GET_VAR '<this>: <root>.DataClass declared in <root>.DataClass.toString' type=<root>.DataClass origin=null
CONST String type=kotlin.String value=")"
@@ -71,7 +71,7 @@ data class DataClass : Derived, Delegate {
}
override fun toString(): String {
return "DataClass(" + "delegate=" + <this>.#delegate + ")"
return "DataClass(delegate=" + <this>.#delegate + ")"
}
}
@@ -126,12 +126,10 @@ FILE fqName:<root> fileName:/destructuringInLambda.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.A'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="A("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="A(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.toString' type=<root>.A origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="y="
CONST String type=kotlin.String value=", y="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.toString' type=<root>.A origin=null
CONST String type=kotlin.String value=")"
@@ -49,7 +49,7 @@ data class A {
}
override fun toString(): String {
return "A(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
return "A(x=" + <this>.#x + ", y=" + <this>.#y + ")"
}
}
+2 -4
View File
@@ -157,12 +157,10 @@ FILE fqName:<root> fileName:/kt45236.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.NetRequestStatus.Error'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Error("
CONST String type=kotlin.String value="error="
CONST String type=kotlin.String value="Error(error="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:error type:kotlin.Throwable visibility:private [final]' type=kotlin.Throwable origin=null
receiver: GET_VAR '<this>: <root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error> declared in <root>.NetRequestStatus.Error.toString' type=<root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error> origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="value="
CONST String type=kotlin.String value=", value="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of <root>.NetRequestStatus.Error? visibility:private [final]' type=T of <root>.NetRequestStatus.Error? origin=null
receiver: GET_VAR '<this>: <root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error> declared in <root>.NetRequestStatus.Error.toString' type=<root>.NetRequestStatus.Error<T of <root>.NetRequestStatus.Error> origin=null
CONST String type=kotlin.String value=")"
@@ -252,12 +252,10 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.P'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="P("
CONST String type=kotlin.String value="x="
CONST String type=kotlin.String value="P(x="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.P declared in <root>.P.toString' type=<root>.P origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="y="
CONST String type=kotlin.String value=", y="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.P declared in <root>.P.toString' type=<root>.P origin=null
CONST String type=kotlin.String value=")"
@@ -125,7 +125,7 @@ data class P {
}
override fun toString(): String {
return "P(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
return "P(x=" + <this>.#x + ", y=" + <this>.#y + ")"
}
}
@@ -87,8 +87,7 @@ FILE fqName:<root> fileName:/typeAliasWithUnsafeVariance.kt
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Tag'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Tag("
CONST String type=kotlin.String value="action="
CONST String type=kotlin.String value="Tag(action="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.toString' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
CONST String type=kotlin.String value=")"
@@ -37,7 +37,7 @@ data class Tag<out RenderingT : Any?> {
}
override fun toString(): String {
return "Tag(" + "action=" + <this>.#action + ")"
return "Tag(action=" + <this>.#action + ")"
}
}
@@ -21235,6 +21235,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stdlibConstFun.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/diagnostics/tests/modifiers/const/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
@@ -28388,6 +28388,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -28388,6 +28388,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -21142,6 +21142,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -21142,6 +21142,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -21142,6 +21142,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -24332,6 +24332,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
@@ -24097,6 +24097,12 @@ public class K1NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringConcatenation.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {