ForLoopsLowering: Handle Iterable.withIndex() where the type is a
bounded type parameter. TODO: Handle Sequences by extending DefaultIterableHandler.
This commit is contained in:
committed by
max-kammerer
parent
e8252ea874
commit
1a2e09e6a5
+15
-12
@@ -731,23 +731,26 @@ internal class WithIndexHandler(context: CommonBackendContext, private val visit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Builds a [HeaderInfo] for iterables not handled by more specialized handlers. */
|
/** Builds a [HeaderInfo] for Iterables not handled by more specialized handlers. */
|
||||||
internal class DefaultIterableHandler(private val context: CommonBackendContext) : ExpressionHandler {
|
internal open class DefaultIterableHandler(private val context: CommonBackendContext) : ExpressionHandler {
|
||||||
|
|
||||||
override fun matchIterable(expression: IrExpression) = true
|
protected open val iterableClassSymbol = context.ir.symbols.iterable
|
||||||
|
|
||||||
|
override fun matchIterable(expression: IrExpression) = expression.type.isSubtypeOfClass(iterableClassSymbol)
|
||||||
|
|
||||||
override fun build(expression: IrExpression, scopeOwner: IrSymbol): HeaderInfo? =
|
override fun build(expression: IrExpression, scopeOwner: IrSymbol): HeaderInfo? =
|
||||||
with(context.createIrBuilder(scopeOwner, expression.startOffset, expression.endOffset)) {
|
with(context.createIrBuilder(scopeOwner, expression.startOffset, expression.endOffset)) {
|
||||||
val iterableClass = expression.type.getClass()!!
|
// The lowering operates on subtypes of Iterable. Therefore, the IrType could be
|
||||||
val iterator =
|
// a type parameter bounded by Iterable. When that is the case, we cannot get
|
||||||
irCall(iterableClass.functions.single {
|
// the class from the type and instead uses the Iterable.iterator() function.
|
||||||
it.name == OperatorNameConventions.ITERATOR &&
|
val iteratorFun = expression.type.getClass()?.functions?.single {
|
||||||
it.valueParameters.isEmpty()
|
it.name == OperatorNameConventions.ITERATOR &&
|
||||||
}).apply {
|
it.valueParameters.isEmpty()
|
||||||
dispatchReceiver = expression
|
} ?: iterableClassSymbol.getSimpleFunction(OperatorNameConventions.ITERATOR.asString())!!.owner
|
||||||
}
|
|
||||||
IterableHeaderInfo(
|
IterableHeaderInfo(
|
||||||
scope.createTmpVariable(iterator, nameHint = "iterator")
|
scope.createTmpVariable(irCall(iteratorFun).apply { dispatchReceiver = expression }, nameHint = "iterator")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
|
|||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
|
// KJS_WITH_FULL_RUNTIME
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
val cs: CharSequence = "abcd"
|
||||||
|
|
||||||
|
fun <T : CharSequence> test(charSequence: T): String {
|
||||||
|
val s = StringBuilder()
|
||||||
|
|
||||||
|
for ((index, x) in charSequence.withIndex()) {
|
||||||
|
s.append("$index:$x;")
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val ss = test(cs)
|
||||||
|
return if (ss == "0:a;1:b;2:c;3:d;") "OK" else "fail: '$ss'"
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
|
// KJS_WITH_FULL_RUNTIME
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
val xs = listOf("a", "b", "c", "d")
|
||||||
|
|
||||||
|
fun <T : Iterable<*>> test(iterable: T): String {
|
||||||
|
val s = StringBuilder()
|
||||||
|
|
||||||
|
for ((index, x) in iterable.withIndex()) {
|
||||||
|
s.append("$index:$x;")
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val ss = test(xs)
|
||||||
|
return if (ss == "0:a;1:b;2:c;3:d;") "OK" else "fail: '$ss'"
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
// IGNORE_BACKEND_FIR: JVM_IR
|
||||||
|
// KJS_WITH_FULL_RUNTIME
|
||||||
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||||
|
|
||||||
|
fun <T : Sequence<*>> test(sequence: T): String {
|
||||||
|
val s = StringBuilder()
|
||||||
|
|
||||||
|
for ((index, x) in sequence.withIndex()) {
|
||||||
|
s.append("$index:$x;")
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val ss = test(xs)
|
||||||
|
return if (ss == "0:a;1:b;2:c;3:d;") "OK" else "fail: '$ss'"
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
fun <T : Iterable<*>> test(iterable: T): String {
|
||||||
|
val s = StringBuilder()
|
||||||
|
|
||||||
|
for ((index, x) in iterable.withIndex()) {
|
||||||
|
s.append("$index:$x;")
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0 withIndex
|
||||||
|
// 1 iterator
|
||||||
|
// 1 hasNext
|
||||||
|
// 1 next
|
||||||
|
// 0 component1
|
||||||
|
// 0 component2
|
||||||
compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt
Vendored
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
val xs = listOf<Any>().asSequence()
|
val xs = listOf<Any>().asSequence()
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
|
fun <T : Sequence<*>> test(sequence: T): String {
|
||||||
|
val s = StringBuilder()
|
||||||
|
|
||||||
|
for ((index, x) in sequence.withIndex()) {
|
||||||
|
s.append("$index:$x;")
|
||||||
|
}
|
||||||
|
|
||||||
|
return s.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0 withIndex
|
||||||
|
// 1 iterator
|
||||||
|
// 1 hasNext
|
||||||
|
// 1 next
|
||||||
|
// 0 component1
|
||||||
|
// 0 component2
|
||||||
Vendored
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
val xsl = arrayListOf("a", "b", "c", "d")
|
val xsl = arrayListOf("a", "b", "c", "d")
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
// IGNORE_BACKEND: JVM_IR
|
||||||
|
// TODO: Handle Sequences by extending DefaultIterableHandler.
|
||||||
val xs = listOf("a", "b", "c", "d").asSequence()
|
val xs = listOf("a", "b", "c", "d").asSequence()
|
||||||
|
|
||||||
fun useAny(x: Any) {}
|
fun useAny(x: Any) {}
|
||||||
|
|||||||
+15
@@ -5399,6 +5399,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInCharSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInCharSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInCharSequenceWithIndex.kt")
|
@TestMetadata("forInCharSequenceWithIndex.kt")
|
||||||
public void testForInCharSequenceWithIndex() throws Exception {
|
public void testForInCharSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
||||||
@@ -5472,6 +5477,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
||||||
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
||||||
@@ -5530,6 +5540,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
@@ -1986,6 +1986,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInListWithIndex.kt")
|
@TestMetadata("forInListWithIndex.kt")
|
||||||
public void testForInListWithIndex() throws Exception {
|
public void testForInListWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt");
|
||||||
@@ -2175,6 +2180,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
+15
@@ -5399,6 +5399,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInCharSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInCharSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInCharSequenceWithIndex.kt")
|
@TestMetadata("forInCharSequenceWithIndex.kt")
|
||||||
public void testForInCharSequenceWithIndex() throws Exception {
|
public void testForInCharSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
||||||
@@ -5472,6 +5477,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
||||||
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
||||||
@@ -5530,6 +5540,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
+15
@@ -5369,6 +5369,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInCharSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInCharSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInCharSequenceWithIndex.kt")
|
@TestMetadata("forInCharSequenceWithIndex.kt")
|
||||||
public void testForInCharSequenceWithIndex() throws Exception {
|
public void testForInCharSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
||||||
@@ -5442,6 +5447,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
||||||
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
||||||
@@ -5500,6 +5510,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
+15
@@ -5369,6 +5369,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInCharSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInCharSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInCharSequenceWithIndex.kt")
|
@TestMetadata("forInCharSequenceWithIndex.kt")
|
||||||
public void testForInCharSequenceWithIndex() throws Exception {
|
public void testForInCharSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
||||||
@@ -5442,6 +5447,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
||||||
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
||||||
@@ -5500,6 +5510,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
+10
@@ -1941,6 +1941,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInListWithIndex.kt")
|
@TestMetadata("forInListWithIndex.kt")
|
||||||
public void testForInListWithIndex() throws Exception {
|
public void testForInListWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt");
|
||||||
@@ -2130,6 +2135,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
|
|||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
Generated
+15
@@ -4499,6 +4499,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInCharSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInCharSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInCharSequenceWithIndex.kt")
|
@TestMetadata("forInCharSequenceWithIndex.kt")
|
||||||
public void testForInCharSequenceWithIndex() throws Exception {
|
public void testForInCharSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
||||||
@@ -4572,6 +4577,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
||||||
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
||||||
@@ -4625,6 +4635,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
+15
@@ -4509,6 +4509,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInCharSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInCharSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInCharSequenceWithIndex.kt")
|
@TestMetadata("forInCharSequenceWithIndex.kt")
|
||||||
public void testForInCharSequenceWithIndex() throws Exception {
|
public void testForInCharSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt");
|
||||||
@@ -4582,6 +4587,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInIterableTypeParameterWithIndex.kt")
|
||||||
|
public void testForInIterableTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
@TestMetadata("forInIterableWithIndexCheckSideEffects.kt")
|
||||||
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
public void testForInIterableWithIndexCheckSideEffects() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInIterableWithIndexCheckSideEffects.kt");
|
||||||
@@ -4635,6 +4645,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("forInSequenceTypeParameterWithIndex.kt")
|
||||||
|
public void testForInSequenceTypeParameterWithIndex() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceTypeParameterWithIndex.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("forInSequenceWithIndex.kt")
|
@TestMetadata("forInSequenceWithIndex.kt")
|
||||||
public void testForInSequenceWithIndex() throws Exception {
|
public void testForInSequenceWithIndex() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user