[IR] Support const optimizations for Native backend

This commit is contained in:
Ivan Kylchik
2023-05-29 00:19:47 +02:00
committed by Space Team
parent 6e6a4d6411
commit ad6332112e
31 changed files with 352 additions and 34 deletions
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
const val minusOneVal = (-1).<!EVALUATED("-1")!>toByte()<!>
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1.0")!>-1.0<!>
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1.0")!>-1.0f<!>
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1")!>-1<!>
@@ -1,7 +1,8 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,7 +1,8 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,7 +1,8 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
fun <T> T.id() = this
enum class EnumClass {
@@ -1,6 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
@@ -1,6 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
@@ -1,8 +1,8 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// IGNORE_BACKEND_K1: JVM_IR, NATIVE, JS_IR, JS_IR_ES6
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
fun <T> T.id() = this
const val flag = <!EVALUATED("true")!>true<!>
@@ -1,7 +1,8 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
fun <T> T.id() = this
@@ -1,6 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,7 +1,8 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// FILE: 1.kt
@@ -1,6 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
var result = "Fail"
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1")!>-1L<!>
@@ -1,5 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
annotation class Key(val value: String)
object Messanger {
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
fun <T> T.id() = this
const val minusOneVal = (-1).<!EVALUATED("-1")!>toShort()<!>
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
object K : Code("K")
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,5 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
object Test {
@@ -1,5 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
object Test
@@ -1,6 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,5 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// This test is needed to check that IrCompileTimeChecker will not fail trying to find and analyze correct toString method
object Obj {
@@ -434,19 +434,6 @@ private val ifNullExpressionsFusionPhase = createFileLoweringPhase(
description = "Simplify '?.' and '?:' operator chains"
)
private val foldConstantLoweringPhase = createFileLoweringPhase(
{ context, irFile -> FoldConstantLowering(context).lower(irFile) },
name = "FoldConstantLowering",
description = "Constant Folding",
prerequisite = setOf(flattenStringConcatenationPhase)
)
private val computeStringTrimPhase = createFileLoweringPhase(
::StringTrimLowering,
name = "StringTrimLowering",
description = "Compute trimIndent and trimMargin operations on constant strings"
)
private val exportInternalAbiPhase = createFileLoweringPhase(
::ExportCachesAbiVisitor,
name = "ExportInternalAbi",
@@ -506,6 +493,13 @@ private val objectClassesPhase = createFileLoweringPhase(
description = "Object classes lowering"
)
private val constEvaluationPhase = createFileLoweringPhase(
lowering = ::ConstEvaluationLowering,
name = "ConstEvaluationLowering",
description = "Evaluate functions that are marked as `IntrinsicConstEvaluation`",
prerequisite = setOf(inlinePhase)
)
private fun PhaseEngine<NativeGenerationState>.getAllLowerings() = listOfNotNull<AbstractNamedCompilerPhase<NativeGenerationState, IrFile, IrFile>>(
removeExpectDeclarationsPhase,
stripTypeAliasDeclarationsPhase,
@@ -518,6 +512,7 @@ private fun PhaseEngine<NativeGenerationState>.getAllLowerings() = listOfNotNull
extractLocalClassesFromInlineBodies,
wrapInlineDeclarationsWithReifiedTypeParametersLowering,
inlinePhase,
constEvaluationPhase,
provisionalFunctionExpressionPhase,
postInlinePhase,
contractsDslRemovePhase,
@@ -525,8 +520,6 @@ private fun PhaseEngine<NativeGenerationState>.getAllLowerings() = listOfNotNull
rangeContainsLoweringPhase,
forLoopsPhase,
flattenStringConcatenationPhase,
foldConstantLoweringPhase,
computeStringTrimPhase,
stringConcatenationPhase,
stringConcatenationTypeNarrowingPhase.takeIf { context.config.optimizationsEnabled },
enumConstructorsPhase,
@@ -23930,6 +23930,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt");
}
@Test
@TestMetadata("objectConstValInAnnotationArgument.kt")
public void testObjectConstValInAnnotationArgument() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
@@ -23960,12 +23966,30 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("thisPlusStringWithObject.kt")
public void testThisPlusStringWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst")
@TestDataPath("$PROJECT_ROOT")
@@ -23978,11 +24002,65 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt");
}
@Test
@TestMetadata("enumNameWithInit.kt")
public void testEnumNameWithInit() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt");
}
@Test
@TestMetadata("equals_after.kt")
public void testEquals_after() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt");
}
@Test
@TestMetadata("kCallableNameWithSideEffect.kt")
public void testKCallableNameWithSideEffect() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt");
}
@Test
@TestMetadata("kt58717.kt")
public void testKt58717() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt");
}
}
@Nested
@@ -24394,6 +24394,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt");
}
@Test
@TestMetadata("objectConstValInAnnotationArgument.kt")
public void testObjectConstValInAnnotationArgument() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
@@ -24424,12 +24430,30 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("thisPlusStringWithObject.kt")
public void testThisPlusStringWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst")
@TestDataPath("$PROJECT_ROOT")
@@ -24444,11 +24468,65 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt");
}
@Test
@TestMetadata("enumNameWithInit.kt")
public void testEnumNameWithInit() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt");
}
@Test
@TestMetadata("equals_after.kt")
public void testEquals_after() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt");
}
@Test
@TestMetadata("kCallableNameWithSideEffect.kt")
public void testKCallableNameWithSideEffect() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt");
}
@Test
@TestMetadata("kt58717.kt")
public void testKt58717() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt");
}
}
@Nested
@@ -23699,6 +23699,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt");
}
@Test
@TestMetadata("objectConstValInAnnotationArgument.kt")
public void testObjectConstValInAnnotationArgument() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
@@ -23729,12 +23735,30 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("thisPlusStringWithObject.kt")
public void testThisPlusStringWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst")
@TestDataPath("$PROJECT_ROOT")
@@ -23746,11 +23770,65 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt");
}
@Test
@TestMetadata("enumNameWithInit.kt")
public void testEnumNameWithInit() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt");
}
@Test
@TestMetadata("equals_after.kt")
public void testEquals_after() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt");
}
@Test
@TestMetadata("kCallableNameWithSideEffect.kt")
public void testKCallableNameWithSideEffect() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt");
}
@Test
@TestMetadata("kt58717.kt")
public void testKt58717() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt");
}
}
@Nested
@@ -23931,6 +23931,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt");
}
@Test
@TestMetadata("objectConstValInAnnotationArgument.kt")
public void testObjectConstValInAnnotationArgument() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
@@ -23961,12 +23967,30 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("thisPlusStringWithObject.kt")
public void testThisPlusStringWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst")
@TestDataPath("$PROJECT_ROOT")
@@ -23979,11 +24003,65 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt");
}
@Test
@TestMetadata("enumNameWithInit.kt")
public void testEnumNameWithInit() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt");
}
@Test
@TestMetadata("equals_after.kt")
public void testEquals_after() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt");
}
@Test
@TestMetadata("kCallableNameWithSideEffect.kt")
public void testKCallableNameWithSideEffect() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt");
}
@Test
@TestMetadata("kt58717.kt")
public void testKt58717() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt");
}
}
@Nested