Make all progression headers inclusive, and decrement last for

last-exclusive progressions (i.e., "until" progressions and loop over
array indices).

This change makes it possible to correctly implement the handling of
"step" progressions. Computing the last element of a stepped progression
requires that the last is inclusive.

Also invert the while loop (into if + do-while) that is used when
lowering for-loops over progressions that cannot overflow. This keeps
the performance characteristics closer to the ForLoopsLowering in
kotlin-native, since the goal is to converge to this shared version.

Also used IrType instead of KotlinType, where possible.

 https://github.com/JetBrains/kotlin/pull/2390
 https://github.com/JetBrains/kotlin/pull/2305
This commit is contained in:
Mark Punzalan
2019-06-14 00:59:47 -07:00
committed by Mikhael Bogdanov
parent 39f6416757
commit de1e27c584
75 changed files with 1873 additions and 377 deletions
@@ -18867,34 +18867,49 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("forInDownToEvaluationOrder.kt")
public void testForInDownToEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToEvaluationOrder.kt");
@TestMetadata("forInDownTo.kt")
public void testForInDownTo() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownTo.kt");
}
@TestMetadata("forInRangeLiteralEvaluationOrder.kt")
public void testForInRangeLiteralEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralEvaluationOrder.kt");
@TestMetadata("forInDownToReversed.kt")
public void testForInDownToReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToReversed.kt");
}
@TestMetadata("forInReversedDownToEvaluationOrder.kt")
public void testForInReversedDownToEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedDownToEvaluationOrder.kt");
@TestMetadata("forInDownToReversedReversed.kt")
public void testForInDownToReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToReversedReversed.kt");
}
@TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt")
public void testForInReversedRangeLiteralEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt");
@TestMetadata("forInRangeLiteral.kt")
public void testForInRangeLiteral() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteral.kt");
}
@TestMetadata("forInReversedUntilEvaluationOrder.kt")
public void testForInReversedUntilEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedUntilEvaluationOrder.kt");
@TestMetadata("forInRangeLiteralReversed.kt")
public void testForInRangeLiteralReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralReversed.kt");
}
@TestMetadata("forInUntilEvaluationOrder.kt")
public void testForInUntilEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilEvaluationOrder.kt");
@TestMetadata("forInRangeLiteralReversedReversed.kt")
public void testForInRangeLiteralReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralReversedReversed.kt");
}
@TestMetadata("forInUntil.kt")
public void testForInUntil() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntil.kt");
}
@TestMetadata("forInUntilReversed.kt")
public void testForInUntilReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilReversed.kt");
}
@TestMetadata("forInUntilReversedReversed.kt")
public void testForInUntilReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilReversedReversed.kt");
}
}
@@ -19312,9 +19327,19 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt");
}
@TestMetadata("forInUntilChar0.kt")
public void testForInUntilChar0() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt");
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilCharMinValue.kt")
public void testForInUntilCharMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMinValue.kt");
}
@TestMetadata("forInUntilCharMinValueNonConst.kt")
public void testForInUntilCharMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMinValueNonConst.kt");
}
@TestMetadata("forInUntilInt.kt")
@@ -19322,6 +19347,21 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilIntMinValue.kt")
public void testForInUntilIntMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMinValue.kt");
}
@TestMetadata("forInUntilIntMinValueNonConst.kt")
public void testForInUntilIntMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMinValueNonConst.kt");
}
@TestMetadata("forInUntilLesserInt.kt")
public void testForInUntilLesserInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt");
@@ -19332,19 +19372,19 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt");
}
@TestMetadata("forInUntilMaxint.kt")
public void testForInUntilMaxint() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt");
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMaxValue.kt");
}
@TestMetadata("forInUntilMinint.kt")
public void testForInUntilMinint() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt");
@TestMetadata("forInUntilLongMinValue.kt")
public void testForInUntilLongMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMinValue.kt");
}
@TestMetadata("forInUntilMinlong.kt")
public void testForInUntilMinlong() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt");
@TestMetadata("forInUntilLongMinValueNonConst.kt")
public void testForInUntilLongMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMinValueNonConst.kt");
}
@TestMetadata("forIntInIntUntilSmartcastInt.kt")
@@ -1742,26 +1742,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInStringSpecialized.kt");
}
@TestMetadata("forInUntil.kt")
public void testForInUntil() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil.kt");
}
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntilLongMaxValue.kt");
}
@TestMetadata("forIntInDownTo.kt")
public void testForIntInDownTo() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forIntInDownTo.kt");
@@ -2079,6 +2059,49 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInUntil")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ForInUntil extends AbstractBytecodeTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInForInUntil() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInUntil"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("forInUntilChar.kt")
public void testForInUntilChar() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilChar.kt");
}
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilInt.kt")
public void testForInUntilInt() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilInt.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilLong.kt")
public void testForInUntilLong() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLong.kt");
}
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLongMaxValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/hashCode")
@@ -18867,34 +18867,49 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("forInDownToEvaluationOrder.kt")
public void testForInDownToEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToEvaluationOrder.kt");
@TestMetadata("forInDownTo.kt")
public void testForInDownTo() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownTo.kt");
}
@TestMetadata("forInRangeLiteralEvaluationOrder.kt")
public void testForInRangeLiteralEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralEvaluationOrder.kt");
@TestMetadata("forInDownToReversed.kt")
public void testForInDownToReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToReversed.kt");
}
@TestMetadata("forInReversedDownToEvaluationOrder.kt")
public void testForInReversedDownToEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedDownToEvaluationOrder.kt");
@TestMetadata("forInDownToReversedReversed.kt")
public void testForInDownToReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToReversedReversed.kt");
}
@TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt")
public void testForInReversedRangeLiteralEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt");
@TestMetadata("forInRangeLiteral.kt")
public void testForInRangeLiteral() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteral.kt");
}
@TestMetadata("forInReversedUntilEvaluationOrder.kt")
public void testForInReversedUntilEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedUntilEvaluationOrder.kt");
@TestMetadata("forInRangeLiteralReversed.kt")
public void testForInRangeLiteralReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralReversed.kt");
}
@TestMetadata("forInUntilEvaluationOrder.kt")
public void testForInUntilEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilEvaluationOrder.kt");
@TestMetadata("forInRangeLiteralReversedReversed.kt")
public void testForInRangeLiteralReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralReversedReversed.kt");
}
@TestMetadata("forInUntil.kt")
public void testForInUntil() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntil.kt");
}
@TestMetadata("forInUntilReversed.kt")
public void testForInUntilReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilReversed.kt");
}
@TestMetadata("forInUntilReversedReversed.kt")
public void testForInUntilReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilReversedReversed.kt");
}
}
@@ -19312,9 +19327,19 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt");
}
@TestMetadata("forInUntilChar0.kt")
public void testForInUntilChar0() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt");
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilCharMinValue.kt")
public void testForInUntilCharMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMinValue.kt");
}
@TestMetadata("forInUntilCharMinValueNonConst.kt")
public void testForInUntilCharMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMinValueNonConst.kt");
}
@TestMetadata("forInUntilInt.kt")
@@ -19322,6 +19347,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilIntMinValue.kt")
public void testForInUntilIntMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMinValue.kt");
}
@TestMetadata("forInUntilIntMinValueNonConst.kt")
public void testForInUntilIntMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMinValueNonConst.kt");
}
@TestMetadata("forInUntilLesserInt.kt")
public void testForInUntilLesserInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt");
@@ -19332,19 +19372,19 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt");
}
@TestMetadata("forInUntilMaxint.kt")
public void testForInUntilMaxint() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt");
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMaxValue.kt");
}
@TestMetadata("forInUntilMinint.kt")
public void testForInUntilMinint() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt");
@TestMetadata("forInUntilLongMinValue.kt")
public void testForInUntilLongMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMinValue.kt");
}
@TestMetadata("forInUntilMinlong.kt")
public void testForInUntilMinlong() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt");
@TestMetadata("forInUntilLongMinValueNonConst.kt")
public void testForInUntilLongMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMinValueNonConst.kt");
}
@TestMetadata("forIntInIntUntilSmartcastInt.kt")
@@ -17757,34 +17757,49 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
}
@TestMetadata("forInDownToEvaluationOrder.kt")
public void testForInDownToEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToEvaluationOrder.kt");
@TestMetadata("forInDownTo.kt")
public void testForInDownTo() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownTo.kt");
}
@TestMetadata("forInRangeLiteralEvaluationOrder.kt")
public void testForInRangeLiteralEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralEvaluationOrder.kt");
@TestMetadata("forInDownToReversed.kt")
public void testForInDownToReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToReversed.kt");
}
@TestMetadata("forInReversedDownToEvaluationOrder.kt")
public void testForInReversedDownToEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedDownToEvaluationOrder.kt");
@TestMetadata("forInDownToReversedReversed.kt")
public void testForInDownToReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInDownToReversedReversed.kt");
}
@TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt")
public void testForInReversedRangeLiteralEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt");
@TestMetadata("forInRangeLiteral.kt")
public void testForInRangeLiteral() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteral.kt");
}
@TestMetadata("forInReversedUntilEvaluationOrder.kt")
public void testForInReversedUntilEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInReversedUntilEvaluationOrder.kt");
@TestMetadata("forInRangeLiteralReversed.kt")
public void testForInRangeLiteralReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralReversed.kt");
}
@TestMetadata("forInUntilEvaluationOrder.kt")
public void testForInUntilEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilEvaluationOrder.kt");
@TestMetadata("forInRangeLiteralReversedReversed.kt")
public void testForInRangeLiteralReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInRangeLiteralReversedReversed.kt");
}
@TestMetadata("forInUntil.kt")
public void testForInUntil() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntil.kt");
}
@TestMetadata("forInUntilReversed.kt")
public void testForInUntilReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilReversed.kt");
}
@TestMetadata("forInUntilReversedReversed.kt")
public void testForInUntilReversedReversed() throws Exception {
runTest("compiler/testData/codegen/box/ranges/evaluationOrder/forInUntilReversedReversed.kt");
}
}
@@ -18202,9 +18217,19 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt");
}
@TestMetadata("forInUntilChar0.kt")
public void testForInUntilChar0() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt");
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilCharMinValue.kt")
public void testForInUntilCharMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMinValue.kt");
}
@TestMetadata("forInUntilCharMinValueNonConst.kt")
public void testForInUntilCharMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilCharMinValueNonConst.kt");
}
@TestMetadata("forInUntilInt.kt")
@@ -18212,6 +18237,21 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilIntMinValue.kt")
public void testForInUntilIntMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMinValue.kt");
}
@TestMetadata("forInUntilIntMinValueNonConst.kt")
public void testForInUntilIntMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilIntMinValueNonConst.kt");
}
@TestMetadata("forInUntilLesserInt.kt")
public void testForInUntilLesserInt() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt");
@@ -18222,19 +18262,19 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt");
}
@TestMetadata("forInUntilMaxint.kt")
public void testForInUntilMaxint() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt");
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMaxValue.kt");
}
@TestMetadata("forInUntilMinint.kt")
public void testForInUntilMinint() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt");
@TestMetadata("forInUntilLongMinValue.kt")
public void testForInUntilLongMinValue() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMinValue.kt");
}
@TestMetadata("forInUntilMinlong.kt")
public void testForInUntilMinlong() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt");
@TestMetadata("forInUntilLongMinValueNonConst.kt")
public void testForInUntilLongMinValueNonConst() throws Exception {
runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLongMinValueNonConst.kt");
}
@TestMetadata("forIntInIntUntilSmartcastInt.kt")
@@ -1657,6 +1657,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharConst.kt");
}
@TestMetadata("forInRangeToCharConstIR.kt")
public void testForInRangeToCharConstIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharConstIR.kt");
}
@TestMetadata("forInRangeToCharMaxValue.kt")
public void testForInRangeToCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharMaxValue.kt");
@@ -1667,6 +1672,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToConst.kt");
}
@TestMetadata("forInRangeToConstIR.kt")
public void testForInRangeToConstIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToConstIR.kt");
}
@TestMetadata("forInRangeToIntMaxValue.kt")
public void testForInRangeToIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToIntMaxValue.kt");
@@ -1677,6 +1687,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongConst.kt");
}
@TestMetadata("forInRangeToLongConstIR.kt")
public void testForInRangeToLongConstIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongConstIR.kt");
}
@TestMetadata("forInRangeToLongMaxValue.kt")
public void testForInRangeToLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongMaxValue.kt");
@@ -1687,6 +1702,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToQualifiedConst.kt");
}
@TestMetadata("forInRangeToQualifiedConstIR.kt")
public void testForInRangeToQualifiedConstIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToQualifiedConstIR.kt");
}
@TestMetadata("forInRangeWithImplicitReceiver.kt")
public void testForInRangeWithImplicitReceiver() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeWithImplicitReceiver.kt");
@@ -1697,26 +1717,6 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInStringSpecialized.kt");
}
@TestMetadata("forInUntil.kt")
public void testForInUntil() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil.kt");
}
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntilLongMaxValue.kt");
}
@TestMetadata("forIntInDownTo.kt")
public void testForIntInDownTo() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forIntInDownTo.kt");
@@ -1737,6 +1737,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange1.kt");
}
@TestMetadata("primitiveLiteralRange1IR.kt")
public void testPrimitiveLiteralRange1IR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange1IR.kt");
}
@TestMetadata("primitiveLiteralRange2.kt")
public void testPrimitiveLiteralRange2() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange2.kt");
@@ -1870,10 +1875,20 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInObjectArrayIndices.kt");
}
@TestMetadata("forInObjectArrayIndicesIR.kt")
public void testForInObjectArrayIndicesIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInObjectArrayIndicesIR.kt");
}
@TestMetadata("forInPrimitiveArrayIndices.kt")
public void testForInPrimitiveArrayIndices() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInPrimitiveArrayIndices.kt");
}
@TestMetadata("forInPrimitiveArrayIndicesIR.kt")
public void testForInPrimitiveArrayIndicesIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInPrimitiveArrayIndicesIR.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex")
@@ -1931,6 +1946,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedArrayIndices.kt");
}
@TestMetadata("forInReversedArrayIndicesIR.kt")
public void testForInReversedArrayIndicesIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedArrayIndicesIR.kt");
}
@TestMetadata("forInReversedCharSequenceIndices.kt")
public void testForInReversedCharSequenceIndices() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedCharSequenceIndices.kt");
@@ -1946,6 +1966,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedDownTo.kt");
}
@TestMetadata("forInReversedDownToIR.kt")
public void testForInReversedDownToIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedDownToIR.kt");
}
@TestMetadata("forInReversedEmptyRangeLiteral.kt")
public void testForInReversedEmptyRangeLiteral() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedEmptyRangeLiteral.kt");
@@ -1961,6 +1986,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedRangeLiteral.kt");
}
@TestMetadata("forInReversedRangeLiteralIR.kt")
public void testForInReversedRangeLiteralIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedRangeLiteralIR.kt");
}
@TestMetadata("forInReversedReversedArrayIndices.kt")
public void testForInReversedReversedArrayIndices() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedArrayIndices.kt");
@@ -1971,6 +2001,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedDownTo.kt");
}
@TestMetadata("forInReversedReversedDownToIR.kt")
public void testForInReversedReversedDownToIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedDownToIR.kt");
}
@TestMetadata("ForInReversedReversedRange.kt")
public void testForInReversedReversedRange() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/ForInReversedReversedRange.kt");
@@ -1986,10 +2021,20 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedUntil.kt");
}
@TestMetadata("forInReversedReversedUntilIR.kt")
public void testForInReversedReversedUntilIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedUntilIR.kt");
}
@TestMetadata("forInReversedUntil.kt")
public void testForInReversedUntil() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedUntil.kt");
}
@TestMetadata("forInReversedUntilIR.kt")
public void testForInReversedUntilIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedUntilIR.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex")
@@ -2034,6 +2079,109 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt");
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInUntil")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class ForInUntil extends AbstractIrBytecodeTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInForInUntil() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInUntil"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
}
@TestMetadata("forInUntilChar.kt")
public void testForInUntilChar() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilChar.kt");
}
@TestMetadata("forInUntilCharIR.kt")
public void testForInUntilCharIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilCharIR.kt");
}
@TestMetadata("forInUntilCharMaxValue.kt")
public void testForInUntilCharMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilCharMaxValue.kt");
}
@TestMetadata("forInUntilCharMaxValueIR.kt")
public void testForInUntilCharMaxValueIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilCharMaxValueIR.kt");
}
@TestMetadata("forInUntilCharMinValueIR.kt")
public void testForInUntilCharMinValueIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilCharMinValueIR.kt");
}
@TestMetadata("forInUntilInt.kt")
public void testForInUntilInt() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilInt.kt");
}
@TestMetadata("forInUntilIntIR.kt")
public void testForInUntilIntIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilIntIR.kt");
}
@TestMetadata("forInUntilIntMaxValue.kt")
public void testForInUntilIntMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilIntMaxValue.kt");
}
@TestMetadata("forInUntilIntMaxValueIR.kt")
public void testForInUntilIntMaxValueIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilIntMaxValueIR.kt");
}
@TestMetadata("forInUntilIntMinValueIR.kt")
public void testForInUntilIntMinValueIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilIntMinValueIR.kt");
}
@TestMetadata("forInUntilLong.kt")
public void testForInUntilLong() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLong.kt");
}
@TestMetadata("forInUntilLongIR.kt")
public void testForInUntilLongIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLongIR.kt");
}
@TestMetadata("forInUntilLongMaxValue.kt")
public void testForInUntilLongMaxValue() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLongMaxValue.kt");
}
@TestMetadata("forInUntilLongMaxValueIR.kt")
public void testForInUntilLongMaxValueIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLongMaxValueIR.kt");
}
@TestMetadata("forInUntilLongMinValueIR.kt")
public void testForInUntilLongMinValueIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilLongMinValueIR.kt");
}
@TestMetadata("forInUntilWithMixedTypeBoundsBoundCheckNeededForIntRangeIR.kt")
public void testForInUntilWithMixedTypeBoundsBoundCheckNeededForIntRangeIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilWithMixedTypeBoundsBoundCheckNeededForIntRangeIR.kt");
}
@TestMetadata("forInUntilWithMixedTypeBoundsNoBoundCheckNeededForIntRangeIR.kt")
public void testForInUntilWithMixedTypeBoundsNoBoundCheckNeededForIntRangeIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilWithMixedTypeBoundsNoBoundCheckNeededForIntRangeIR.kt");
}
@TestMetadata("forInUntilWithMixedTypeBoundsNoBoundCheckNeededForLongRangeIR.kt")
public void testForInUntilWithMixedTypeBoundsNoBoundCheckNeededForLongRangeIR() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil/forInUntilWithMixedTypeBoundsNoBoundCheckNeededForLongRangeIR.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/hashCode")