[IR] Fix KT-59346, KT-55993
#KT-59346 #KT-55993
This commit is contained in:
committed by
Space Team
parent
e802ee05a7
commit
2d920df507
+12
@@ -52977,6 +52977,18 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longCondition.kt")
|
@TestMetadata("longCondition.kt")
|
||||||
public void testLongCondition() throws Exception {
|
public void testLongCondition() throws Exception {
|
||||||
|
|||||||
+12
@@ -52977,6 +52977,18 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longCondition.kt")
|
@TestMetadata("longCondition.kt")
|
||||||
public void testLongCondition() throws Exception {
|
public void testLongCondition() throws Exception {
|
||||||
|
|||||||
+1
@@ -792,6 +792,7 @@ class ExpressionCodegen(
|
|||||||
declaration.markLineNumber(startOffset = true)
|
declaration.markLineNumber(startOffset = true)
|
||||||
mv.store(index, varType)
|
mv.store(index, varType)
|
||||||
} else if (declaration.isVisibleInLVT) {
|
} else if (declaration.isVisibleInLVT) {
|
||||||
|
declaration.markLineNumber(startOffset = true)
|
||||||
pushDefaultValueOnStack(varType, mv)
|
pushDefaultValueOnStack(varType, mv)
|
||||||
mv.store(index, varType)
|
mv.store(index, varType)
|
||||||
}
|
}
|
||||||
|
|||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
// CHECK_BYTECODE_TEXT
|
||||||
|
|
||||||
|
fun test(boolean: Boolean) {
|
||||||
|
if (boolean) { // Breakpoint
|
||||||
|
throw IllegalArgumentException()
|
||||||
|
}
|
||||||
|
val x: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
test(false)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1 LINENUMBER 7 L1\n +ICONST_0\n +ISTORE 1
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
// CHECK_BYTECODE_TEXT
|
||||||
|
|
||||||
|
fun test(boolean: Boolean) {
|
||||||
|
val x: Int // Breakpoint
|
||||||
|
if (boolean) {
|
||||||
|
throw IllegalArgumentException()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
test(false)
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1 LINENUMBER 4
|
||||||
@@ -11,16 +11,15 @@ fun box() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The JVM IR backend does not generate line number information for the
|
// The JVM IR backend does generate line number information for the
|
||||||
// declaration of local variables without initializer. Stepping through
|
// declaration of local variables without initializer.
|
||||||
// those does not seem useful. This is consistent with javac behavior
|
// Stepping through those is useful for breakpoinnts.
|
||||||
// as well. The JVM backend does generate these line numbers.
|
// The JVM backend does generate these line numbers as well.
|
||||||
|
|
||||||
// EXPECTATIONS JVM
|
// EXPECTATIONS JVM JVM_IR
|
||||||
// test.kt:4 box
|
// test.kt:4 box
|
||||||
// test.kt:5 box
|
// test.kt:5 box
|
||||||
// test.kt:6 box
|
// test.kt:6 box
|
||||||
// EXPECTATIONS JVM JVM_IR
|
|
||||||
// test.kt:7 box
|
// test.kt:7 box
|
||||||
// test.kt:8 box
|
// test.kt:8 box
|
||||||
// test.kt:9 box
|
// test.kt:9 box
|
||||||
|
|||||||
+12
@@ -49941,6 +49941,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -52977,6 +52977,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longCondition.kt")
|
@TestMetadata("longCondition.kt")
|
||||||
public void testLongCondition() throws Exception {
|
public void testLongCondition() throws Exception {
|
||||||
|
|||||||
+12
@@ -52977,6 +52977,18 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longCondition.kt")
|
@TestMetadata("longCondition.kt")
|
||||||
public void testLongCondition() throws Exception {
|
public void testLongCondition() throws Exception {
|
||||||
|
|||||||
+10
@@ -40717,6 +40717,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/when/longInRange.kt");
|
runTest("compiler/testData/codegen/box/when/longInRange.kt");
|
||||||
|
|||||||
+12
@@ -36483,6 +36483,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -36909,6 +36909,18 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -36909,6 +36909,18 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -36909,6 +36909,18 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -40587,6 +40587,18 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -41621,6 +41621,18 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -40071,6 +40071,18 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
+12
@@ -40588,6 +40588,18 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
|
|||||||
Generated
+10
@@ -32997,6 +32997,16 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
|||||||
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
runTest("compiler/testData/codegen/box/when/kt5448.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt55993.kt")
|
||||||
|
public void testKt55993() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt55993.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt59346.kt")
|
||||||
|
public void testKt59346() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/when/kt59346.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("longInRange.kt")
|
@TestMetadata("longInRange.kt")
|
||||||
public void testLongInRange() throws Exception {
|
public void testLongInRange() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/when/longInRange.kt");
|
runTest("compiler/testData/codegen/box/when/longInRange.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user