diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt index f631f05eab1..6c9f5f78385 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/WasmLoweringPhases.kt @@ -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>.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, diff --git a/compiler/testData/codegen/box/constants/doNotTriggerInit.kt b/compiler/testData/codegen/box/constants/doNotTriggerInit.kt index df4deed2f88..c8818645746 100644 --- a/compiler/testData/codegen/box/constants/doNotTriggerInit.kt +++ b/compiler/testData/codegen/box/constants/doNotTriggerInit.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_K1: WASM var initialized = 0 object O { diff --git a/compiler/testData/codegen/box/constants/kt9532.kt b/compiler/testData/codegen/box/constants/kt9532.kt index 976fb09f6a7..bfd002ed60c 100644 --- a/compiler/testData/codegen/box/constants/kt9532.kt +++ b/compiler/testData/codegen/box/constants/kt9532.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_K2: WASM - object A { const val a: String = "$" const val b = "1234$a" diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt index b6c8677bb60..b799e9e320a 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.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 fun T.id() = this const val trueVal = true diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt index 7b3b3f4de1a..aa626cf3279 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/byteOperations.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 fun T.id() = this const val minusOneVal = (-1).toByte() diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt index 9b0af1dd826..f3ec40bee6e 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/charOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/charOperations.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt b/compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt index 01e43febc97..e3975795026 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/complexBooleanConstant.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 const val BOOL = true const val BOOL_OR = false && BOOL const val BOOL_AND = true || BOOL diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt index f3a490f6239..df7c8ee6cd9 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/doubleOperations.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 fun T.id() = this const val minusOneVal = -1.0 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt index 96ec81a59fc..7a4987e1972 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/floatOperations.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 fun T.id() = this const val minusOneVal = -1.0f diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt b/compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt index b406ad0d6bc..041e91af5ad 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/inJavaLangPackage.kt @@ -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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt b/compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt index 8fabb3327d2..1e3929f58ae 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/inJavaPackage.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 package java2d diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt index a4debf20a6b..b3d70d1396e 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intOperations.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 fun T.id() = this const val minusOneVal = -1 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt index 87753c939b1..1ee0696531e 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimIndent.kt @@ -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.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt index 5c02ff41997..17668993108 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/constTrimMargin.kt @@ -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.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt index aa7e3339ce3..ee428d669b8 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumName.kt @@ -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.id() = this enum class EnumClass { diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt index 64d58fa0c4a..17f6252d022 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/enumNameWithInit.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt index e35a9e1123c..a4c30533e6e 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/equals_after.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt index 0ba3ce769ef..dd9bc4fac5d 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/ifConstVal.kt @@ -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.id() = this const val flag = true diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt index e5977b8b57d..830a60db132 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableName.kt @@ -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.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt index 218df02b570..a9b611a999f 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kCallableNameWithSideEffect.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 // WITH_STDLIB fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt index 7324d5b2e42..e80cbaa91e7 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt53272.kt @@ -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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt index 3f6ce25dd3a..60e60d8a5e1 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/kt58717.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" diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt index 45ba86b655b..4473ea58537 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/intrinsicConst/nullableEnumName.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt b/compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt index e25b53fd8ab..7ceb382b537 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/jvmFloatDoubleToString.kt @@ -1,5 +1,6 @@ // TARGET_BACKEND: JVM_IR // TARGET_BACKEND: NATIVE +// TARGET_BACKEND: WASM fun T.id() = this const val toStringDouble1 = 1.0.toString() diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt index ee6419f6ae3..54ff8c0167a 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/longOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/longOperations.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 fun T.id() = this const val minusOneVal = -1L diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt b/compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt index a1e25e66381..446a5079504 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/objectConstValInAnnotationArgument.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 annotation class Key(val value: String) object Messanger { diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt index a7bcc8e7b73..95bcbc1b205 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationInArguments.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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt index 1dfc76de3b0..aeb99f32b33 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationSerialization.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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt index 6189a51850a..27711826b2b 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithArray.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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt index f50e82f11c5..435abb7f04a 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/annotationWithDefaults.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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt index 7fd2a7140b6..0f0fb4bf28d 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/nestedTypeAnnotation.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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt index 06c00f0b62f..6520739bbea 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/serialization/typeAnnotation.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 diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt index ba8dc5ac790..1f909ccaa3a 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/shortOperations.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 fun T.id() = this const val minusOneVal = (-1).toShort() diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt b/compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt index 671f87b5acd..e7718272ad5 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/stdlibConst.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt b/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt index 5a3607fbca9..1dc4068094f 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenation.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt b/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt index 1b2b4d7ec3d..0228ae70a53 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.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 object K : Code("K") diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt b/compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt index 150225f615a..9ad4a34269f 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/stringOperations.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt b/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt index 8f2c98d85ea..0c3510fcc21 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.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 object Test { diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt b/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt index 7742b0e7fd8..6da6024bffa 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/thisPlusStringWithObject.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 object Test diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt b/compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt index 1099513b786..b7921423aeb 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/unsignedConst.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 fun T.id() = this diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt b/compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt index a7b6ca14e1a..cd6ee5170af 100644 --- a/compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt +++ b/compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.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 // This test is needed to check that IrCompileTimeChecker will not fail trying to find and analyze correct toString method object Obj { diff --git a/compiler/testData/codegen/box/size/add.kt b/compiler/testData/codegen/box/size/add.kt index 45599cf96ab..eaaf034618d 100644 --- a/compiler/testData/codegen/box/size/add.kt +++ b/compiler/testData/codegen/box/size/add.kt @@ -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 diff --git a/compiler/testData/codegen/box/size/helloWorld.kt b/compiler/testData/codegen/box/size/helloWorld.kt index 944035ca84f..09bf108f41a 100644 --- a/compiler/testData/codegen/box/size/helloWorld.kt +++ b/compiler/testData/codegen/box/size/helloWorld.kt @@ -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 { diff --git a/compiler/testData/codegen/box/size/helloWorldDOM.kt b/compiler/testData/codegen/box/size/helloWorldDOM.kt index 53fc0e05c7b..d3b45ed9e66 100644 --- a/compiler/testData/codegen/box/size/helloWorldDOM.kt +++ b/compiler/testData/codegen/box/size/helloWorldDOM.kt @@ -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 diff --git a/compiler/testData/codegen/box/size/objectsOptimization.kt b/compiler/testData/codegen/box/size/objectsOptimization.kt index 70abbd49680..0fc59bf4d59 100644 --- a/compiler/testData/codegen/box/size/objectsOptimization.kt +++ b/compiler/testData/codegen/box/size/objectsOptimization.kt @@ -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 { diff --git a/compiler/testData/codegen/box/size/ok.kt b/compiler/testData/codegen/box/size/ok.kt index 22148b8e075..a75dc1b9df3 100644 --- a/compiler/testData/codegen/box/size/ok.kt +++ b/compiler/testData/codegen/box/size/ok.kt @@ -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" \ No newline at end of file diff --git a/compiler/testData/codegen/box/size/removeUnusedOverride.kt b/compiler/testData/codegen/box/size/removeUnusedOverride.kt index dbb7130b949..ba9452379f9 100644 --- a/compiler/testData/codegen/box/size/removeUnusedOverride.kt +++ b/compiler/testData/codegen/box/size/removeUnusedOverride.kt @@ -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" diff --git a/compiler/testData/codegen/box/strings/constInStringTemplate.kt b/compiler/testData/codegen/box/strings/constInStringTemplate.kt index dd04981cd9f..a07b3a41ead 100644 --- a/compiler/testData/codegen/box/strings/constInStringTemplate.kt +++ b/compiler/testData/codegen/box/strings/constInStringTemplate.kt @@ -1,5 +1,3 @@ -// IGNORE_BACKEND_K1: WASM -// IGNORE_BACKEND_K2: WASM // WITH_STDLIB import kotlin.test.assertEquals diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index e8820d8a9ab..be53b3da431 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -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"); + } } } diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 8ca50186ab3..4c174d283a3 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -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"); + } } }