[WASM] Add ConstEvaluationLowering to the lowering list

This commit is contained in:
Ivan Kylchik
2023-11-16 17:16:15 +01:00
committed by Space Team
parent 427c067cd8
commit c82bc8f0ce
50 changed files with 560 additions and 130 deletions
@@ -21,7 +21,10 @@ import org.jetbrains.kotlin.ir.backend.js.lower.coroutines.JsSuspendFunctionsLow
import org.jetbrains.kotlin.ir.backend.js.lower.inline.RemoveInlineDeclarationsWithReifiedTypeParametersLowering
import org.jetbrains.kotlin.ir.backend.wasm.lower.generateMainFunctionCalls
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
import org.jetbrains.kotlin.ir.interpreter.IrInterpreterConfiguration
import org.jetbrains.kotlin.ir.util.patchDeclarationParents
import org.jetbrains.kotlin.platform.WasmPlatform
import org.jetbrains.kotlin.platform.toTargetPlatform
private fun List<CompilerPhase<WasmBackendContext, IrModuleFragment, IrModuleFragment>>.toCompilerPhase() =
reduce { acc, lowering -> acc.then(lowering) }
@@ -590,6 +593,19 @@ private val inlineObjectsWithPureInitializationLoweringPhase = makeIrModulePhase
prerequisite = setOf(purifyObjectInstanceGettersLoweringPhase)
)
val constEvaluationPhase = makeIrModulePhase(
{ context ->
val configuration = IrInterpreterConfiguration(
printOnlyExceptionMessage = true,
platform = WasmPlatform.toTargetPlatform(),
)
ConstEvaluationLowering(context, configuration = configuration)
},
name = "ConstEvaluationLowering",
description = "Evaluate functions that are marked as `IntrinsicConstEvaluation`",
prerequisite = setOf(functionInliningPhase)
)
val loweringList = listOf(
validateIrBeforeLowering,
jsCodeCallsLowering,
@@ -611,6 +627,7 @@ val loweringList = listOf(
wrapInlineDeclarationsWithReifiedTypeParametersPhase,
functionInliningPhase,
constEvaluationPhase,
removeInlineDeclarationsWithReifiedTypeParametersLoweringPhase,
tailrecLoweringPhase,
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_K1: WASM
var initialized = 0
object O {
-2
View File
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_K2: WASM
object A {
const val a: String = "$"
const val b = "1234$a"
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val trueVal = <!EVALUATED("true")!>true<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val minusOneVal = (-1).<!EVALUATED("-1")!>toByte()<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
const val BOOL = <!EVALUATED("true")!>true<!>
const val BOOL_OR = <!EVALUATED("false")!>false && BOOL<!>
const val BOOL_AND = <!EVALUATED("true")!>true || BOOL<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1.0")!>-1.0<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1.0")!>-1.0f<!>
@@ -1,6 +1,6 @@
// Can't be tested in JVM because frontend doesn't allow such code
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JVM_IR
// WITH_STDLIB
package java.lang
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
package java2d
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1")!>-1<!>
@@ -1,8 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,8 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,8 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
fun <T> T.id() = this
enum class EnumClass {
@@ -1,7 +1,6 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
@@ -1,7 +1,6 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
@@ -1,8 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
fun <T> T.id() = this
const val flag = <!EVALUATED("true")!>true<!>
@@ -1,8 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
fun <T> T.id() = this
@@ -1,7 +1,6 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,8 +1,7 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// IGNORE_BACKEND_K1: JVM_IR, JS_IR, JS_IR_ES6, NATIVE, WASM
// FILE: 1.kt
@@ -1,7 +1,6 @@
// !LANGUAGE: +IntrinsicConstEvaluation
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
var result = "Fail"
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,5 +1,6 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: WASM
fun <T> T.id() = this
const val toStringDouble1 = 1.0.<!EVALUATED("1.0")!>toString()<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val minusOneVal = <!EVALUATED("-1")!>-1L<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
annotation class Key(val value: String)
object Messanger {
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// MODULE: lib
// FILE: lib.kt
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// MODULE: lib
// FILE: lib.kt
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// MODULE: lib
// FILE: lib.kt
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// MODULE: lib
// FILE: lib.kt
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
// MODULE: lib
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
// MODULE: lib
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
fun <T> T.id() = this
const val minusOneVal = (-1).<!EVALUATED("-1")!>toShort()<!>
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
object K : Code("K")
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
object Test {
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
object Test
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// WITH_STDLIB
fun <T> T.id() = this
@@ -1,6 +1,5 @@
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JVM
// DONT_TARGET_EXACT_BACKEND: JS
// This test is needed to check that IrCompileTimeChecker will not fail trying to find and analyze correct toString method
object Obj {
+1 -1
View File
@@ -1,6 +1,6 @@
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_946
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_559
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_526
// FILE: test.kt
+1 -1
View File
@@ -1,6 +1,6 @@
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 40_730
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 38_992
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_552
fun box(): String {
+1 -1
View File
@@ -1,6 +1,6 @@
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 14_307
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 13_922
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 5_081
// FILE: test.kt
+1 -4
View File
@@ -1,11 +1,8 @@
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 18_621
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 17_619
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_398
// Muting because K2 DCE code size was less than expected (17377)
// IGNORE_BACKEND_K2: WASM
object Simple
object SimpleWithConstVal {
+1 -1
View File
@@ -1,6 +1,6 @@
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_988
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 12_601
// WASM_DCE_EXPECTED_OUTPUT_SIZE: mjs 4_398
fun box() = "OK"
+1 -1
View File
@@ -1,7 +1,7 @@
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: WASM
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 13_506
// WASM_DCE_EXPECTED_OUTPUT_SIZE: wasm 13_109
interface I {
fun foo() = "OK"
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_K1: WASM
// IGNORE_BACKEND_K2: WASM
// WITH_STDLIB
import kotlin.test.assertEquals
@@ -21711,6 +21711,66 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt");
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt");
}
@Test
@TestMetadata("inJavaLangPackage.kt")
public void testInJavaLangPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt");
}
@Test
@TestMetadata("inJavaPackage.kt")
public void testInJavaPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt");
}
@Test
@TestMetadata("jvmFloatDoubleToString.kt")
public void testJvmFloatDoubleToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt");
}
@Test
@TestMetadata("kt55912.kt")
public void testKt55912() throws Exception {
@@ -21723,6 +21783,72 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt56215.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
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 {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
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/constEvaluationFromJavaWorld")
@TestDataPath("$PROJECT_ROOT")
@@ -21741,6 +21867,72 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
public void testAllFilesPresentInIntrinsicConst() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, 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");
}
@Test
@TestMetadata("nullableEnumName.kt")
public void testNullableEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt");
}
}
@Nested
@@ -21751,6 +21943,42 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
public void testAllFilesPresentInSerialization() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/serialization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("annotationInArguments.kt")
public void testAnnotationInArguments() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt");
}
@Test
@TestMetadata("annotationSerialization.kt")
public void testAnnotationSerialization() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt");
}
@Test
@TestMetadata("annotationWithArray.kt")
public void testAnnotationWithArray() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt");
}
@Test
@TestMetadata("annotationWithDefaults.kt")
public void testAnnotationWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt");
}
@Test
@TestMetadata("nestedTypeAnnotation.kt")
public void testNestedTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt");
}
@Test
@TestMetadata("typeAnnotation.kt")
public void testTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt");
}
}
}
@@ -21711,6 +21711,66 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt");
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt");
}
@Test
@TestMetadata("complexBooleanConstant.kt")
public void testComplexBooleanConstant() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt");
}
@Test
@TestMetadata("inJavaLangPackage.kt")
public void testInJavaLangPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt");
}
@Test
@TestMetadata("inJavaPackage.kt")
public void testInJavaPackage() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt");
}
@Test
@TestMetadata("jvmFloatDoubleToString.kt")
public void testJvmFloatDoubleToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt");
}
@Test
@TestMetadata("kt55912.kt")
public void testKt55912() throws Exception {
@@ -21723,6 +21783,72 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt56215.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
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 {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt");
}
@Test
@TestMetadata("stringConcatenation.kt")
public void testStringConcatenation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
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/constEvaluationFromJavaWorld")
@TestDataPath("$PROJECT_ROOT")
@@ -21741,6 +21867,72 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
public void testAllFilesPresentInIntrinsicConst() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, 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");
}
@Test
@TestMetadata("nullableEnumName.kt")
public void testNullableEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt");
}
}
@Nested
@@ -21751,6 +21943,42 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
public void testAllFilesPresentInSerialization() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/serialization"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("annotationInArguments.kt")
public void testAnnotationInArguments() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt");
}
@Test
@TestMetadata("annotationSerialization.kt")
public void testAnnotationSerialization() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt");
}
@Test
@TestMetadata("annotationWithArray.kt")
public void testAnnotationWithArray() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt");
}
@Test
@TestMetadata("annotationWithDefaults.kt")
public void testAnnotationWithDefaults() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt");
}
@Test
@TestMetadata("nestedTypeAnnotation.kt")
public void testNestedTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt");
}
@Test
@TestMetadata("typeAnnotation.kt")
public void testTypeAnnotation() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt");
}
}
}