Use while loop for progressions that cannot overflow (instead of
do-while with enclosing "not empty" check). Also do not add additional "not empty" condition for `until` loops when the given bound is a constant != MIN_VALUE.
This commit is contained in:
committed by
max-kammerer
parent
ba0e016c4e
commit
7680e7fd56
@@ -1627,6 +1627,21 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequence.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInDownToCharMinValue.kt")
|
||||
public void testForInDownToCharMinValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInDownToCharMinValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInDownToIntMinValue.kt")
|
||||
public void testForInDownToIntMinValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInDownToIntMinValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInDownToLongMinValue.kt")
|
||||
public void testForInDownToLongMinValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInDownToLongMinValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInObjectArray.kt")
|
||||
public void testForInObjectArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInObjectArray.kt");
|
||||
@@ -1652,16 +1667,31 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToCharMaxValue.kt")
|
||||
public void testForInRangeToCharMaxValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToConst.kt")
|
||||
public void testForInRangeToConst() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToIntMaxValue.kt")
|
||||
public void testForInRangeToIntMaxValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToIntMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToLongConst.kt")
|
||||
public void testForInRangeToLongConst() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongConst.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToLongMaxValue.kt")
|
||||
public void testForInRangeToLongMaxValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongMaxValue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forInRangeToQualifiedConst.kt")
|
||||
public void testForInRangeToQualifiedConst() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToQualifiedConst.kt");
|
||||
@@ -1682,6 +1712,21 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user