diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethod.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethod.java index 59b70780233..2dc1b4a56cd 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethod.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethod.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.kotlin.codegen.Callable; import org.jetbrains.kotlin.codegen.CallableMethod; import org.jetbrains.kotlin.codegen.ExpressionCodegen; +import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor; import org.jetbrains.kotlin.descriptors.FunctionDescriptor; import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall; import org.jetbrains.kotlin.resolve.jvm.AsmTypes; @@ -36,6 +37,10 @@ public abstract class IntrinsicMethod { return toCallable(codegen.getState().getTypeMapper().mapToCallableMethod(fd, false), isSuper, resolvedCall); } + public boolean isApplicableToOverload(@NotNull CallableMemberDescriptor descriptor) { + return true; + } + @NotNull protected Callable toCallable(@NotNull CallableMethod method, boolean isSuper, @NotNull ResolvedCall resolvedCall) { return toCallable(method, isSuper); diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethods.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethods.java index 7644fe2c6ae..5a009b79e48 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethods.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicMethods.java @@ -41,6 +41,8 @@ public class IntrinsicMethods { private static final FqName KOTLIN_JVM = new FqName("kotlin.jvm"); /* package */ static final FqNameUnsafe RECEIVER_PARAMETER_FQ_NAME = new FqNameUnsafe("T"); + private static final FqNameUnsafe KOTLIN_ULONG = new FqNameUnsafe("kotlin.ULong"); + private static final IntrinsicMethod UNARY_MINUS = new UnaryMinus(); private static final IntrinsicMethod UNARY_PLUS = new UnaryPlus(); private static final IntrinsicMethod NUMBER_CAST = new NumberCast(); @@ -153,6 +155,16 @@ public class IntrinsicMethods { } declareArrayMethods(); + + if (jvmTarget.compareTo(JvmTarget.JVM_1_8) >= 0) { + Java8ULongDivide java8ULongDivide = new Java8ULongDivide(); + Java8ULongRemainder java8ULongRemainder = new Java8ULongRemainder(); + + intrinsicsMap.registerIntrinsic(KOTLIN_ULONG.toSafe(), null, "div", 1, java8ULongDivide); + intrinsicsMap.registerIntrinsic(KOTLIN_ULONG.toSafe(), null, "rem", 1, java8ULongRemainder); + intrinsicsMap.registerIntrinsic(BUILT_INS_PACKAGE_FQ_NAME, null, "ulongDivide", 2, java8ULongDivide); + intrinsicsMap.registerIntrinsic(BUILT_INS_PACKAGE_FQ_NAME, null, "ulongRemainder", 2, java8ULongRemainder); + } } private void declareArrayMethods() { diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicsMap.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicsMap.kt index 271df50e1a9..57edf557f7a 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicsMap.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/IntrinsicsMap.kt @@ -56,12 +56,15 @@ internal class IntrinsicsMap { } fun getIntrinsic(descriptor: CallableMemberDescriptor): IntrinsicMethod? = - intrinsicsMap[Key( + intrinsicsMap[getKey(descriptor)]?.takeIf { it.isApplicableToOverload(descriptor.original) } + + private fun getKey(descriptor: CallableMemberDescriptor): Key = + Key( DescriptorUtils.getFqName(descriptor.containingDeclaration), getReceiverParameterFqName(descriptor), descriptor.name.asString(), valueParameterCountForKey(descriptor) - )] + ) private fun getReceiverParameterFqName(descriptor: CallableMemberDescriptor): FqNameUnsafe? { val receiverParameter = descriptor.extensionReceiverParameter ?: return null @@ -72,4 +75,6 @@ internal class IntrinsicsMap { else DescriptorUtils.getFqName(classifier) } + } + diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/Java8ULongDivision.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/Java8ULongDivision.kt new file mode 100644 index 00000000000..c17f8fba01c --- /dev/null +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/intrinsics/Java8ULongDivision.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen.intrinsics + +import org.jetbrains.kotlin.codegen.Callable +import org.jetbrains.kotlin.codegen.CallableMethod +import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor +import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor + +abstract class UnsignedLongDivisionIntrinsic : IntrinsicMethod() { + override fun isApplicableToOverload(descriptor: CallableMemberDescriptor): Boolean { + if (descriptor.containingDeclaration is PackageFragmentDescriptor) return true + val singleValueParameterTypeDescriptor = descriptor.valueParameters.single().type.constructor.declarationDescriptor + ?: throw AssertionError("Unexpected descriptor for unsigned long division intrinsic: $descriptor") + return singleValueParameterTypeDescriptor.name.asString() == "ULong" + } +} + + +class Java8ULongDivide : UnsignedLongDivisionIntrinsic() { + override fun toCallable(method: CallableMethod): Callable = + createIntrinsicCallable(method) { + it.invokestatic("java/lang/Long", "divideUnsigned", "(JJ)J", false) + } +} + + +class Java8ULongRemainder : UnsignedLongDivisionIntrinsic() { + override fun toCallable(method: CallableMethod): Callable = + createIntrinsicCallable(method) { + it.invokestatic("java/lang/Long", "remainderUnsigned", "(JJ)J", false) + } +} + diff --git a/compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt b/compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt new file mode 100644 index 00000000000..a1255517540 --- /dev/null +++ b/compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt @@ -0,0 +1,18 @@ +// JVM_TARGET: 1.6 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val uai = ua.toUInt() +val u = ua * ub + +fun box(): String { + val div = u / ua + if (div != ub) throw AssertionError("$div") + + val divInt = u / uai + if (div != ub) throw AssertionError("$div") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt b/compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt new file mode 100644 index 00000000000..dc9e41d843a --- /dev/null +++ b/compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt @@ -0,0 +1,18 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val uai = ua.toUInt() +val u = ua * ub + +fun box(): String { + val div = u / ua + if (div != ub) throw AssertionError("$div") + + val divInt = u / uai + if (div != ub) throw AssertionError("$div") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt b/compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt new file mode 100644 index 00000000000..f2e7b9693ee --- /dev/null +++ b/compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt @@ -0,0 +1,15 @@ +// JVM_TARGET: 1.6 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val uc = 3456UL +val u = ua * ub + uc + +fun box(): String { + val rem = u % ub + if (rem != uc) throw AssertionError("$rem") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt b/compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt new file mode 100644 index 00000000000..4db32088819 --- /dev/null +++ b/compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt @@ -0,0 +1,15 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val uc = 3456UL +val u = ua * ub + uc + +fun box(): String { + val rem = u % ub + if (rem != uc) throw AssertionError("$rem") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm16.kt b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm16.kt new file mode 100644 index 00000000000..ede5f25489b --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm16.kt @@ -0,0 +1,16 @@ +// JVM_TARGET: 1.6 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val u = ua * ub + +fun box(): String { + val div = u / ua + if (div != ub) throw AssertionError("$div") + + return "OK" +} + +// 1 INVOKESTATIC kotlin/UnsignedKt.ulongDivide \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm18.kt b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm18.kt new file mode 100644 index 00000000000..a5009fcdee5 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm18.kt @@ -0,0 +1,17 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val u = ua * ub + +fun box(): String { + val div = u / ua + if (div != ub) throw AssertionError("$div") + + return "OK" +} + +// 0 kotlin/UnsignedKt.ulongDivide +// 1 INVOKESTATIC java/lang/Long.divideUnsigned \(JJ\)J \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm16.kt b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm16.kt new file mode 100644 index 00000000000..572ed22e742 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm16.kt @@ -0,0 +1,17 @@ +// JVM_TARGET: 1.6 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val uc = 3456UL +val u = ua * ub + uc + +fun box(): String { + val rem = u % ub + if (rem != uc) throw AssertionError("$rem") + + return "OK" +} + +// 1 kotlin/UnsignedKt.ulongRemainder \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm18.kt b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm18.kt new file mode 100644 index 00000000000..3722369f575 --- /dev/null +++ b/compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm18.kt @@ -0,0 +1,18 @@ +// JVM_TARGET: 1.8 +// WITH_RUNTIME +// IGNORE_BACKEND: JVM_IR + +val ua = 1234UL +val ub = 5678UL +val uc = 3456UL +val u = ua * ub + uc + +fun box(): String { + val rem = u % ub + if (rem != uc) throw AssertionError("$rem") + + return "OK" +} + +// 0 kotlin/UnsignedKt.ulongRemainder +// 1 INVOKESTATIC java/lang/Long.remainderUnsigned \(JJ\)J \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index bed35e6731d..799a85a4693 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -24288,6 +24288,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt"); } + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + @TestMetadata("unsignedTypePrefixIncrementDecrementBoxing.kt") public void testUnsignedTypePrefixIncrementDecrementBoxing() throws Exception { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypePrefixIncrementDecrementBoxing.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index 95ff1ce77e4..417f9a86424 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -3106,6 +3106,39 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { } } + @TestMetadata("compiler/testData/codegen/bytecodeText/unsignedTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnsignedTypes extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnsignedTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + } + @TestMetadata("compiler/testData/codegen/bytecodeText/varargs") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/IrBytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/IrBytecodeTextTestGenerated.java index c47c717cf1a..0add5fc69e8 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/IrBytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/IrBytecodeTextTestGenerated.java @@ -3106,6 +3106,39 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest { } } + @TestMetadata("compiler/testData/codegen/bytecodeText/unsignedTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnsignedTypes extends AbstractIrBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInUnsignedTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/unsignedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); + } + + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/bytecodeText/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + } + @TestMetadata("compiler/testData/codegen/bytecodeText/varargs") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 9c8a05161f4..be1d851999b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -24288,6 +24288,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt"); } + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + @TestMetadata("unsignedTypePrefixIncrementDecrementBoxing.kt") public void testUnsignedTypePrefixIncrementDecrementBoxing() throws Exception { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypePrefixIncrementDecrementBoxing.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index bbdb1e82687..d5c590b278b 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -24293,6 +24293,26 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt"); } + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + @TestMetadata("unsignedTypePrefixIncrementDecrementBoxing.kt") public void testUnsignedTypePrefixIncrementDecrementBoxing() throws Exception { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypePrefixIncrementDecrementBoxing.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java index 83491a5f951..dd6a0d20810 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrJsCodegenBoxTestGenerated.java @@ -18738,6 +18738,26 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt"); } + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + @TestMetadata("unsignedTypePrefixIncrementDecrementBoxing.kt") public void testUnsignedTypePrefixIncrementDecrementBoxing() throws Exception { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypePrefixIncrementDecrementBoxing.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index f76cceaafdd..1097b0f57ea 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -19788,6 +19788,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLiteralsWithSignedOverflow.kt"); } + @TestMetadata("unsignedLongDivide_jvm16.kt") + public void testUnsignedLongDivide_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm16.kt"); + } + + @TestMetadata("unsignedLongDivide_jvm18.kt") + public void testUnsignedLongDivide_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongDivide_jvm18.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm16.kt") + public void testUnsignedLongRemainder_jvm16() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm16.kt"); + } + + @TestMetadata("unsignedLongRemainder_jvm18.kt") + public void testUnsignedLongRemainder_jvm18() throws Exception { + runTest("compiler/testData/codegen/box/unsignedTypes/unsignedLongRemainder_jvm18.kt"); + } + @TestMetadata("unsignedTypePrefixIncrementDecrementBoxing.kt") public void testUnsignedTypePrefixIncrementDecrementBoxing() throws Exception { runTest("compiler/testData/codegen/box/unsignedTypes/unsignedTypePrefixIncrementDecrementBoxing.kt");