JVM_IR fix special bridge generation for inline classes
This commit is contained in:
+28
@@ -17356,6 +17356,34 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class InlineClassCollection extends AbstractFirBlackBoxCodegenTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+11
-7
@@ -17,10 +17,8 @@ import org.jetbrains.kotlin.backend.jvm.JvmLoweredDeclarationOrigin
|
||||
import org.jetbrains.kotlin.backend.jvm.codegen.isJvmInterface
|
||||
import org.jetbrains.kotlin.backend.jvm.ir.*
|
||||
import org.jetbrains.kotlin.backend.jvm.lower.inlineclasses.unboxInlineClass
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.codegen.AsmUtil
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.ir.IrStatement
|
||||
import org.jetbrains.kotlin.ir.builders.*
|
||||
@@ -593,17 +591,23 @@ internal class BridgeLowering(val context: JvmBackendContext) : FileLoweringPass
|
||||
fun computeJvmMethod(function: IrFunction): Method =
|
||||
signatureCache.getOrPut(function.symbol) { context.methodSignatureMapper.mapAsmMethod(function) }
|
||||
|
||||
private fun canHaveSpecialBridge(function: IrSimpleFunction): Boolean {
|
||||
if (function.name in specialBridgeMethods.specialMethodNames)
|
||||
return true
|
||||
// Function name could be mangled by inline class rules
|
||||
val functionName = function.name.asString()
|
||||
if (specialBridgeMethods.specialMethodNames.any { functionName.startsWith(it.asString() + "-") })
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
fun computeSpecialBridge(function: IrSimpleFunction): SpecialBridge? {
|
||||
// Optimization: do not try to compute special bridge for irrelevant methods.
|
||||
val correspondingProperty = function.correspondingPropertySymbol
|
||||
if (correspondingProperty != null) {
|
||||
if (correspondingProperty.owner.name !in specialBridgeMethods.specialPropertyNames) return null
|
||||
} else {
|
||||
// 'remove' and 'removeAt' functions can be mangled by inline class rules
|
||||
if (function.name !in specialBridgeMethods.specialMethodNames &&
|
||||
!function.name.asString().startsWith("removeAt-") &&
|
||||
!function.name.asString().startsWith("remove-")
|
||||
) {
|
||||
if (!canHaveSpecialBridge(function)) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
inline class ZArray(val storage: IntArray) : Collection<Z> {
|
||||
override val size: Int
|
||||
get() = storage.size
|
||||
|
||||
override fun contains(element: Z): Boolean {
|
||||
return storage.contains(element.x)
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<Z>): Boolean {
|
||||
return elements.all { contains(it) }
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean {
|
||||
return storage.isEmpty()
|
||||
}
|
||||
|
||||
private class ZArrayIterator(val storage: IntArray): Iterator<Z> {
|
||||
var index = 0
|
||||
|
||||
override fun hasNext(): Boolean = index < storage.size
|
||||
|
||||
override fun next(): Z = Z(storage[index++])
|
||||
}
|
||||
|
||||
override fun iterator(): Iterator<Z> = ZArrayIterator(storage)
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val zs = ZArray(IntArray(5))
|
||||
|
||||
val testSize = zs.size
|
||||
if (testSize != 5) return "Failed: testSize=$testSize"
|
||||
|
||||
val testContains = zs.contains(object {} as Any)
|
||||
if (testContains) return "Failed: testContains=$testContains"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
inline class ZArray(val storage: IntArray) : List<Z> {
|
||||
override val size: Int
|
||||
get() = storage.size
|
||||
|
||||
override fun contains(element: Z): Boolean {
|
||||
return storage.contains(element.x)
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<Z>): Boolean {
|
||||
return elements.all { contains(it) }
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean {
|
||||
return storage.isEmpty()
|
||||
}
|
||||
|
||||
override fun get(index: Int): Z = Z(storage[index])
|
||||
|
||||
override fun indexOf(element: Z): Int = storage.indexOf(element.x)
|
||||
|
||||
override fun lastIndexOf(element: Z): Int = storage.lastIndexOf(element.x)
|
||||
|
||||
override fun listIterator(): ListIterator<Z> = ZArrayIterator(storage)
|
||||
|
||||
override fun listIterator(index: Int): ListIterator<Z> = ZArrayIterator(storage, index)
|
||||
|
||||
override fun subList(fromIndex: Int, toIndex: Int): List<Z> = TODO()
|
||||
|
||||
private class ZArrayIterator(val storage: IntArray, var index: Int = 0): ListIterator<Z> {
|
||||
override fun hasNext(): Boolean = index < storage.size
|
||||
override fun next(): Z = Z(storage[index++])
|
||||
override fun nextIndex(): Int = index + 1
|
||||
|
||||
override fun hasPrevious(): Boolean = index > 0
|
||||
override fun previous(): Z = Z(storage[index--])
|
||||
override fun previousIndex(): Int = index - 1
|
||||
}
|
||||
|
||||
override fun iterator(): Iterator<Z> = ZArrayIterator(storage)
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val zs = ZArray(IntArray(5))
|
||||
|
||||
val testElement = object {} as Any
|
||||
zs.contains(testElement)
|
||||
zs.indexOf(testElement)
|
||||
zs.lastIndexOf(testElement)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+57
@@ -0,0 +1,57 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
inline class ZArrayMap(val storage: IntArray) : Map<Z, Z> {
|
||||
override val size: Int
|
||||
get() = storage.size
|
||||
|
||||
private class MapEntry(val i: Int, val si: Int): Map.Entry<Z, Z> {
|
||||
override val key: Z get() = Z(i)
|
||||
override val value: Z get() = Z(si)
|
||||
}
|
||||
|
||||
private class MapEntrySet(val storage: IntArray) : AbstractSet<Map.Entry<Z, Z>>() {
|
||||
private inner class MyIterator : Iterator<Map.Entry<Z, Z>> {
|
||||
var index = 0
|
||||
override fun hasNext(): Boolean = index < size
|
||||
override fun next(): Map.Entry<Z, Z> = MapEntry(index, storage[index++])
|
||||
}
|
||||
|
||||
override val size: Int
|
||||
get() = storage.size
|
||||
|
||||
override fun iterator(): Iterator<Map.Entry<Z, Z>> = MyIterator()
|
||||
}
|
||||
|
||||
override val entries: Set<Map.Entry<Z, Z>>
|
||||
get() = MapEntrySet(storage)
|
||||
|
||||
override val keys: Set<Z>
|
||||
get() = (0 until size).mapTo(HashSet()) { Z(it) }
|
||||
|
||||
override val values: Collection<Z>
|
||||
get() = storage.mapTo(ArrayList()) { Z(it) }
|
||||
|
||||
override fun containsKey(key: Z): Boolean = key.x in (0 until size)
|
||||
|
||||
override fun containsValue(value: Z): Boolean = storage.contains(value.x)
|
||||
|
||||
override fun get(key: Z) = storage.getOrNull(key.x)?.let { Z(it) }
|
||||
|
||||
override fun isEmpty(): Boolean = size > 0
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val zm = ZArrayMap(IntArray(5))
|
||||
|
||||
zm.containsKey(Z(0))
|
||||
zm.containsValue(Z(0))
|
||||
zm[Z(0)]
|
||||
|
||||
zm.containsKey(object {} as Any)
|
||||
zm.containsValue(object {} as Any)
|
||||
zm.get(object {} as Any)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
compiler/testData/codegen/bytecodeListing/inlineClasses/inlineCollection/UIntArrayWithFullJdk_ir.txt
Vendored
+1
-1
@@ -29,7 +29,7 @@ public final class UIntArray {
|
||||
public synthetic final static method box-impl(p0: int[]): UIntArray
|
||||
public method clear(): void
|
||||
public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.NotNull p0: int[]): int[]
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-fLmw4x8(p0: int): boolean
|
||||
public static method contains-fLmw4x8(p0: int[], p1: int): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public final class InlineCollection {
|
||||
public synthetic final static method box-impl(p0: java.util.Collection): InlineCollection
|
||||
public method clear(): void
|
||||
public static method constructor-impl(p0: java.util.Collection): java.util.Collection
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.Collection, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
|
||||
Vendored
+3
-3
@@ -28,7 +28,7 @@ public final class InlineList {
|
||||
public synthetic final static method box-impl(p0: java.util.List): InlineList
|
||||
public method clear(): void
|
||||
public static method constructor-impl(p0: java.util.List): java.util.List
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.List, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
@@ -43,14 +43,14 @@ public final class InlineList {
|
||||
public static method getSize-impl(p0: java.util.List): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.List): int
|
||||
public synthetic bridge method indexOf(p0: java.lang.Object): int
|
||||
public bridge final method indexOf(p0: java.lang.Object): int
|
||||
public method indexOf-jHY5zpA(p0: int): int
|
||||
public static method indexOf-jHY5zpA(p0: java.util.List, p1: int): int
|
||||
public method isEmpty(): boolean
|
||||
public static method isEmpty-impl(p0: java.util.List): boolean
|
||||
public method iterator(): java.util.Iterator
|
||||
public static method iterator-impl(p0: java.util.List): java.util.Iterator
|
||||
public synthetic bridge method lastIndexOf(p0: java.lang.Object): int
|
||||
public bridge final method lastIndexOf(p0: java.lang.Object): int
|
||||
public method lastIndexOf-jHY5zpA(p0: int): int
|
||||
public static method lastIndexOf-jHY5zpA(p0: java.util.List, p1: int): int
|
||||
public method listIterator(): java.util.ListIterator
|
||||
|
||||
Vendored
+3
-2
@@ -39,16 +39,17 @@ public final class InlineMap {
|
||||
public synthetic final static method box-impl(p0: java.util.Map): InlineMap
|
||||
public method clear(): void
|
||||
public static method constructor-impl(p0: java.util.Map): java.util.Map
|
||||
public synthetic bridge method containsKey(p0: java.lang.Object): boolean
|
||||
public bridge final method containsKey(p0: java.lang.Object): boolean
|
||||
public method containsKey-FSIWiWE(p0: int): boolean
|
||||
public static method containsKey-FSIWiWE(p0: java.util.Map, p1: int): boolean
|
||||
public synthetic bridge method containsValue(p0: java.lang.Object): boolean
|
||||
public bridge final method containsValue(p0: java.lang.Object): boolean
|
||||
public method containsValue-jbX5DO8(p0: double): boolean
|
||||
public static method containsValue-jbX5DO8(p0: java.util.Map, p1: double): boolean
|
||||
public synthetic bridge method entrySet(): java.util.Set
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.Map, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.Map, p1: java.util.Map): boolean
|
||||
public bridge final method get(p0: java.lang.Object): IV
|
||||
public synthetic bridge method get(p0: java.lang.Object): java.lang.Object
|
||||
public method get-qgyy0Jc(p0: int): IV
|
||||
public static method get-qgyy0Jc(p0: java.util.Map, p1: int): IV
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public final class InlineMutableCollection {
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Collection): void
|
||||
public static method constructor-impl(p0: java.util.Collection): java.util.Collection
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.Collection, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@ public final class InlineMutableList {
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.List): void
|
||||
public static method constructor-impl(p0: java.util.List): java.util.List
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.List, p1: long): boolean
|
||||
public method contains-jHY5zpA(p0: long): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
@@ -48,14 +48,14 @@ public final class InlineMutableList {
|
||||
public static method getSize-impl(p0: java.util.List): int
|
||||
public method hashCode(): int
|
||||
public static method hashCode-impl(p0: java.util.List): int
|
||||
public synthetic bridge method indexOf(p0: java.lang.Object): int
|
||||
public bridge final method indexOf(p0: java.lang.Object): int
|
||||
public static method indexOf-jHY5zpA(p0: java.util.List, p1: long): int
|
||||
public method indexOf-jHY5zpA(p0: long): int
|
||||
public method isEmpty(): boolean
|
||||
public static method isEmpty-impl(p0: java.util.List): boolean
|
||||
public method iterator(): java.util.Iterator
|
||||
public static method iterator-impl(p0: java.util.List): java.util.Iterator
|
||||
public synthetic bridge method lastIndexOf(p0: java.lang.Object): int
|
||||
public bridge final method lastIndexOf(p0: java.lang.Object): int
|
||||
public static method lastIndexOf-jHY5zpA(p0: java.util.List, p1: long): int
|
||||
public method lastIndexOf-jHY5zpA(p0: long): int
|
||||
public method listIterator(): java.util.ListIterator
|
||||
|
||||
+3
-2
@@ -40,16 +40,17 @@ public final class InlineMutableMap {
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Map): void
|
||||
public static method constructor-impl(p0: java.util.Map): java.util.Map
|
||||
public synthetic bridge method containsKey(p0: java.lang.Object): boolean
|
||||
public bridge final method containsKey(p0: java.lang.Object): boolean
|
||||
public method containsKey-FSIWiWE(p0: int): boolean
|
||||
public static method containsKey-FSIWiWE(p0: java.util.Map, p1: int): boolean
|
||||
public synthetic bridge method containsValue(p0: java.lang.Object): boolean
|
||||
public bridge final method containsValue(p0: java.lang.Object): boolean
|
||||
public method containsValue-jbX5DO8(p0: double): boolean
|
||||
public static method containsValue-jbX5DO8(p0: java.util.Map, p1: double): boolean
|
||||
public synthetic bridge method entrySet(): java.util.Set
|
||||
public method equals(p0: java.lang.Object): boolean
|
||||
public static method equals-impl(p0: java.util.Map, p1: java.lang.Object): boolean
|
||||
public final static method equals-impl0(p0: java.util.Map, p1: java.util.Map): boolean
|
||||
public bridge final method get(p0: java.lang.Object): IV
|
||||
public synthetic bridge method get(p0: java.lang.Object): java.lang.Object
|
||||
public method get-qgyy0Jc(p0: int): IV
|
||||
public static method get-qgyy0Jc(p0: java.util.Map, p1: int): IV
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public final class InlineMutableSet2 {
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Set): void
|
||||
public static method constructor-impl(p0: java.util.Set): java.util.Set
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-C2ZI6mw(p0: int): boolean
|
||||
public static method contains-C2ZI6mw(p0: java.util.Set, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public final class InlineMutableSet {
|
||||
public method clear(): void
|
||||
public static method clear-impl(p0: java.util.Set): void
|
||||
public static method constructor-impl(p0: java.util.Set): java.util.Set
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.Set, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
|
||||
Vendored
+1
-1
@@ -25,7 +25,7 @@ public final class InlineSet {
|
||||
public synthetic final static method box-impl(p0: java.util.Set): InlineSet
|
||||
public method clear(): void
|
||||
public static method constructor-impl(p0: java.util.Set): java.util.Set
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-jHY5zpA(p0: int): boolean
|
||||
public static method contains-jHY5zpA(p0: java.util.Set, p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public final class UIntArray {
|
||||
public synthetic final static method box-impl(p0: int[]): UIntArray
|
||||
public method clear(): void
|
||||
public static method constructor-impl(p0: int[]): int[]
|
||||
public synthetic bridge method contains(p0: java.lang.Object): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public method contains-WZ4Q5Ns(p0: int): boolean
|
||||
public static method contains-WZ4Q5Ns(p0: int[], p1: int): boolean
|
||||
public method containsAll(p0: java.util.Collection): boolean
|
||||
|
||||
+28
@@ -17356,6 +17356,34 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class InlineClassCollection extends AbstractBlackBoxCodegenTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+28
@@ -17356,6 +17356,34 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class InlineClassCollection extends AbstractIrBlackBoxCodegenTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+28
@@ -15191,6 +15191,34 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineClassCollection extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+28
@@ -13086,6 +13086,34 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineClassCollection extends AbstractIrJsCodegenBoxES6Test {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR_ES6, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+28
@@ -13086,6 +13086,34 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineClassCollection extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Generated
+28
@@ -13151,6 +13151,34 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineClassCollection extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+28
@@ -7377,6 +7377,34 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassCollection")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineClassCollection extends AbstractIrCodegenBoxWasmTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInlineClassCollection() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/inlineClassCollection"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCollectionOfInlineClass.kt")
|
||||
public void testInlineCollectionOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineCollectionOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineListOfInlineClass.kt")
|
||||
public void testInlineListOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineListOfInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineMapOfInlineClass.kt")
|
||||
public void testInlineMapOfInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/inlineClassCollection/inlineMapOfInlineClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/interfaceDelegation")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user