diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxedBasicValue.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxedBasicValue.kt index 2a6f2f30af7ff..a65a411e0b668 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxedBasicValue.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxedBasicValue.kt @@ -24,7 +24,6 @@ import org.jetbrains.kotlin.resolve.isInlineClass import org.jetbrains.kotlin.resolve.jvm.AsmTypes import org.jetbrains.org.objectweb.asm.Type import org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode -import java.util.* abstract class BoxedBasicValue(type: Type) : StrictBasicValue(type) { abstract val descriptor: BoxedValueDescriptor diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxingInterpreter.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxingInterpreter.kt index 3bd5184da6b59..053c4332168b4 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxingInterpreter.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/BoxingInterpreter.kt @@ -22,6 +22,7 @@ import org.jetbrains.kotlin.codegen.AsmUtil import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicMethods import org.jetbrains.kotlin.codegen.optimization.common.OptimizationBasicInterpreter import org.jetbrains.kotlin.codegen.optimization.common.StrictBasicValue +import org.jetbrains.kotlin.codegen.range.* import org.jetbrains.kotlin.codegen.state.GenerationState import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper import org.jetbrains.kotlin.codegen.topLevelClassInternalName @@ -35,13 +36,13 @@ import org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode import org.jetbrains.org.objectweb.asm.tree.InsnList import org.jetbrains.org.objectweb.asm.tree.MethodInsnNode import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue -import java.util.* open class BoxingInterpreter( private val insnList: InsnList, private val generationState: GenerationState ) : OptimizationBasicInterpreter() { private val boxingPlaces = HashMap() + private val progressionIterators = HashMap() protected open fun createNewBoxing( insn: AbstractInsnNode, @@ -89,8 +90,18 @@ open class BoxingInterpreter( onUnboxing(insn, firstArg, value.type) value } - insn.isIteratorMethodCallOfProgression(values) -> - ProgressionIteratorBasicValue.byProgressionClassType(firstArg.type) + insn.isIteratorMethodCall() -> { + values.markBoxedArgumentValues() + val firstArgType = firstArg.type + if (isProgressionClass(firstArgType)) { + progressionIterators.getOrPut(insn) { + ProgressionIteratorBasicValue.byProgressionClassType(insn, firstArgType)!! + } + } else { + progressionIterators[insn]?.taint() + value + } + } insn.isNextMethodCallOfProgressionIterator(values) -> { val progressionIterator = firstArg as? ProgressionIteratorBasicValue ?: throw AssertionError("firstArg should be progression iterator") @@ -269,14 +280,27 @@ fun AbstractInsnNode.isNextMethodCallOfProgressionIterator(values: List) = isMethodInsnWith(Opcodes.INVOKEINTERFACE) { val firstArgType = values.firstOrNull()?.type - name == "iterator" && firstArgType != null && isProgressionClass(firstArgType) + name == "iterator" && desc == "()Ljava/util/Iterator;" && + firstArgType != null && isProgressionClass(firstArgType) } +private val PROGRESSION_CLASS_FQNS = setOf( + CHAR_RANGE_FQN, CHAR_PROGRESSION_FQN, + INT_RANGE_FQN, INT_PROGRESSION_FQN, + LONG_RANGE_FQN, LONG_PROGRESSION_FQN +) + private fun isProgressionClass(type: Type) = - ProgressionIteratorBasicValue.byProgressionClassType(type) != null + type.className in PROGRESSION_CLASS_FQNS + fun AbstractInsnNode.isAreEqualIntrinsicForSameTypedBoxedValues(values: List) = isAreEqualIntrinsic() && areSameTypedPrimitiveBoxedValues(values) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/ProgressionIteratorBasicValue.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/ProgressionIteratorBasicValue.kt index 0fcfb4d8ec2a0..52c1cc138a384 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/ProgressionIteratorBasicValue.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/ProgressionIteratorBasicValue.kt @@ -20,17 +20,23 @@ import org.jetbrains.kotlin.codegen.AsmUtil import org.jetbrains.kotlin.codegen.optimization.common.StrictBasicValue import org.jetbrains.kotlin.codegen.range.* import org.jetbrains.org.objectweb.asm.Type +import org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode class ProgressionIteratorBasicValue private constructor( + val iteratorCallInsn: AbstractInsnNode, val nextMethodName: String, iteratorType: Type, private val primitiveElementType: Type, val boxedElementType: Type ) : StrictBasicValue(iteratorType) { - private constructor(typeName: String, valuesPrimitiveType: Type, valuesBoxedType: Type = AsmUtil.boxType(valuesPrimitiveType)) : - this("next$typeName", Type.getObjectType("kotlin/collections/${typeName}Iterator"), valuesPrimitiveType, valuesBoxedType) + var tainted = false + private set + + fun taint() { + tainted = true + } val nextMethodDesc: String get() = "()" + primitiveElementType.descriptor @@ -47,32 +53,35 @@ private constructor( super.hashCode() * 31 + nextMethodName.hashCode() companion object { - private val CHAR_PROGRESSION_ITERATOR_VALUE = ProgressionIteratorBasicValue("Char", Type.CHAR_TYPE) - private val INT_PROGRESSION_ITERATOR_VALUE = ProgressionIteratorBasicValue("Int", Type.INT_TYPE) - private val LONG_PROGRESSION_ITERATOR_VALUE = ProgressionIteratorBasicValue("Long", Type.LONG_TYPE) - // TODO functions returning inline classes are mangled now, should figure out how to work with UInt/ULong iterators here - // private val UINT_PROGRESSION_ITERATOR_VALUE = // ProgressionIteratorBasicValue("UInt", Type.INT_TYPE, Type.getObjectType("kotlin/UInt")) - // private val ULONG_PROGRESSION_ITERATOR_VALUE = // ProgressionIteratorBasicValue("ULong", Type.LONG_TYPE, Type.getObjectType("kotlin/ULong")) - private val PROGRESSION_CLASS_NAME_TO_ITERATOR_VALUE: Map = - hashMapOf( - CHAR_RANGE_FQN to CHAR_PROGRESSION_ITERATOR_VALUE, - CHAR_PROGRESSION_FQN to CHAR_PROGRESSION_ITERATOR_VALUE, - INT_RANGE_FQN to INT_PROGRESSION_ITERATOR_VALUE, - INT_PROGRESSION_FQN to INT_PROGRESSION_ITERATOR_VALUE, - LONG_RANGE_FQN to LONG_PROGRESSION_ITERATOR_VALUE, - LONG_PROGRESSION_FQN to LONG_PROGRESSION_ITERATOR_VALUE, - // UINT_RANGE_FQN to UINT_PROGRESSION_ITERATOR_VALUE, - // UINT_PROGRESSION_FQN to UINT_PROGRESSION_ITERATOR_VALUE, - // ULONG_RANGE_FQN to ULONG_PROGRESSION_ITERATOR_VALUE, - // ULONG_PROGRESSION_FQN to ULONG_PROGRESSION_ITERATOR_VALUE + private fun progressionIteratorValue( + iteratorCallInsn: AbstractInsnNode, + typeName: String, + valuesPrimitiveType: Type, + valuesBoxedType: Type = AsmUtil.boxType(valuesPrimitiveType) + ) = + ProgressionIteratorBasicValue( + iteratorCallInsn, + "next$typeName", + Type.getObjectType("kotlin/collections/${typeName}Iterator"), + valuesPrimitiveType, + valuesBoxedType ) - fun byProgressionClassType(progressionClassType: Type): ProgressionIteratorBasicValue? = - PROGRESSION_CLASS_NAME_TO_ITERATOR_VALUE[progressionClassType.className] + fun byProgressionClassType(iteratorCallInsn: AbstractInsnNode, progressionClassType: Type): ProgressionIteratorBasicValue? = + when (progressionClassType.className) { + CHAR_RANGE_FQN, CHAR_PROGRESSION_FQN -> + progressionIteratorValue(iteratorCallInsn, "Char", Type.CHAR_TYPE) + INT_RANGE_FQN, INT_PROGRESSION_FQN -> + progressionIteratorValue(iteratorCallInsn, "Int", Type.INT_TYPE) + LONG_RANGE_FQN, LONG_PROGRESSION_FQN -> + progressionIteratorValue(iteratorCallInsn, "Long", Type.LONG_TYPE) + else -> + null + } } } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt index 5844d1f8e0cee..91b8b6f88bd68 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/boxing/RedundantBoxingMethodTransformer.kt @@ -33,7 +33,6 @@ import org.jetbrains.org.objectweb.asm.commons.InstructionAdapter import org.jetbrains.org.objectweb.asm.tree.* import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue import org.jetbrains.org.objectweb.asm.tree.analysis.Frame -import java.util.* class RedundantBoxingMethodTransformer(private val generationState: GenerationState) : MethodTransformer() { @@ -50,6 +49,9 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt val valuesToOptimize = interpreter.candidatesBoxedValues if (!valuesToOptimize.isEmpty) { + // has side effect on valuesToOptimize + removeValuesFromTaintedProgressionIterators(valuesToOptimize) + // has side effect on valuesToOptimize and frames, containing BoxedBasicValues that are unsafe to remove removeValuesClashingWithVariables(valuesToOptimize, node, frames) @@ -86,7 +88,7 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt private fun removeValuesClashingWithVariables( values: RedundantBoxedValuesCollection, node: MethodNode, - frames: Array> + frames: Array?> ) { while (removeValuesClashingWithVariablesPass(values, node, frames)) { // do nothing @@ -126,6 +128,15 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt return needToRepeat } + private fun removeValuesFromTaintedProgressionIterators(valuesToOptimize: RedundantBoxedValuesCollection) { + for (descriptor in valuesToOptimize.toList()) { + val progressionIterator = descriptor?.progressionIterator ?: continue + if (progressionIterator.tainted) { + valuesToOptimize.remove(descriptor) + } + } + } + private fun isUnsafeToRemoveBoxingForConnectedValues(usedValues: List, unboxedType: Type): Boolean = usedValues.any { input -> if (input === StrictBasicValue.UNINITIALIZED_VALUE) return@any false @@ -135,7 +146,7 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt !descriptor.isSafeToRemove || descriptor.unboxedType != unboxedType } - private fun adaptLocalVariableTableForBoxedValues(node: MethodNode, frames: Array>) { + private fun adaptLocalVariableTableForBoxedValues(node: MethodNode, frames: Array?>) { for (localVariableNode in node.localVariables) { if (Type.getType(localVariableNode.desc).sort != Type.OBJECT) { continue diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/nullCheck/NullabilityInterpreter.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/nullCheck/NullabilityInterpreter.kt index 30dd112662935..3abf2a4ca9790 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/nullCheck/NullabilityInterpreter.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/nullCheck/NullabilityInterpreter.kt @@ -84,7 +84,7 @@ class NullabilityInterpreter(private val generationState: GenerationState) : Opt insn.isBoxing(generationState) -> NotNullBasicValue(resultType) insn.isIteratorMethodCallOfProgression(values) -> - ProgressionIteratorBasicValue.byProgressionClassType(values[0].type) + ProgressionIteratorBasicValue.byProgressionClassType(insn, values[0].type) insn.isNextMethodCallOfProgressionIterator(values) -> NotNullBasicValue(resultType) insn.isPseudo(PseudoInsn.AS_NOT_NULL) -> diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 9b075d728c4d7..d1c3fa3a81139 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -1826,6 +1826,12 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @Test + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @Test @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { @@ -1922,6 +1928,12 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @Test + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @Test @TestMetadata("variables.kt") public void testVariables() throws Exception { diff --git a/compiler/testData/codegen/box/boxingOptimization/kt49548.kt b/compiler/testData/codegen/box/boxingOptimization/kt49548.kt new file mode 100644 index 0000000000000..6fb93ce332158 --- /dev/null +++ b/compiler/testData/codegen/box/boxingOptimization/kt49548.kt @@ -0,0 +1,16 @@ +// IGNORE_BACKEND: WASM +// WITH_RUNTIME + +val p0 = 0..3 + +fun test(): List { + val progression = if (p0.last == 3) p0 + 1 else p0 + return progression.map { it } +} + +fun box(): String { + val t = test() + if (t != listOf(0, 1, 2, 3, 1)) + return "Failed: t=$t" + return "OK" +} diff --git a/compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt b/compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt new file mode 100644 index 0000000000000..e09ffd087a237 --- /dev/null +++ b/compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt @@ -0,0 +1,14 @@ +// IGNORE_BACKEND: WASM +// WITH_RUNTIME +import kotlin.test.assertEquals + +fun test() { + var i = 0 + val a = ubyteArrayOf(3u, 2u, 1u) + a.forEach { e -> assertEquals(e, a[i++]) } +} + +fun box(): String { + test() + return "OK" +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index d4dbe44d3bab9..c1d056cc82cfd 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -1748,6 +1748,12 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @Test + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @Test @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { @@ -1844,6 +1850,12 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @Test + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @Test @TestMetadata("variables.kt") public void testVariables() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 86d4635092e12..585a5f64b4841 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -1826,6 +1826,12 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @Test + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @Test @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { @@ -1922,6 +1928,12 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @Test + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @Test @TestMetadata("variables.kt") public void testVariables() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index e6c62bc635930..14e966fb2a66f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -1545,6 +1545,11 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); @@ -1625,6 +1630,11 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @TestMetadata("variables.kt") public void testVariables() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index c77da3c2849e1..bdc8b38918ea0 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -1025,6 +1025,11 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); @@ -1095,6 +1100,11 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @TestMetadata("variables.kt") public void testVariables() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index d5c368657fe12..5f62768c8ea4b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -1025,6 +1025,11 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); @@ -1095,6 +1100,11 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @TestMetadata("variables.kt") public void testVariables() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 4a3303cc3fa17..f2c6e1eab4b5f 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -1005,6 +1005,11 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); @@ -1075,6 +1080,11 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @TestMetadata("variables.kt") public void testVariables() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index f6b4f042b5dec..6e71cee31af80 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -910,6 +910,11 @@ public void testKt46859() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt46859.kt"); } + @TestMetadata("kt49548.kt") + public void testKt49548() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/kt49548.kt"); + } + @TestMetadata("kt5588.kt") public void testKt5588() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); @@ -965,6 +970,11 @@ public void testUnsafeRemoving() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } + @TestMetadata("unsignedArrayForEach.kt") + public void testUnsignedArrayForEach() throws Exception { + runTest("compiler/testData/codegen/box/boxingOptimization/unsignedArrayForEach.kt"); + } + @TestMetadata("variables.kt") public void testVariables() throws Exception { runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt");