[JVM_IR] Improve debugging behavior of inline functions
Specifically, this commit improves the stepping behavior of the IR
backend around functions with defaults.
- Improved line numbers in the default handler itself for better
stepping when inlined.
- Improved source information on default arguments
- Improved test coverage of stepping behavior in old and IR backends.
Improves the stepping behaviour around inline methods with default
arguments. In particular, we now accurately step through the
evaluation of default arguments, but do _not_ spuriously show the exit
from the $default handler.
This commit is contained in:
@@ -6982,11 +6982,6 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
|
||||
runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/dataClassCopy.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaults.kt")
|
||||
public void testDefaults() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/defaults.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationBy.kt")
|
||||
public void testDelegationBy() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt");
|
||||
|
||||
Generated
+6
-6
@@ -98,9 +98,9 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultFunction.kt")
|
||||
public void testDefaultFunction() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/defaultFunction.kt");
|
||||
@TestMetadata("defaultFunction_ir.kt")
|
||||
public void testDefaultFunction_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/defaultFunction_ir.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedFunctionOverriddenByProperty_ir.kt")
|
||||
@@ -433,9 +433,9 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/dataClassCopy.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaults.kt")
|
||||
public void testDefaults() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/defaults.kt");
|
||||
@TestMetadata("defaults_ir.kt")
|
||||
public void testDefaults_ir() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/defaults_ir.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationBy_ir.kt")
|
||||
|
||||
Generated
+6
-6
@@ -103,9 +103,9 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultFunction.kt")
|
||||
public void testDefaultFunction() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/defaultFunction.kt");
|
||||
@TestMetadata("defaultFunction_old.kt")
|
||||
public void testDefaultFunction_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/accidentalOverrides/defaultFunction_old.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegatedFunctionOverriddenByProperty_old.kt")
|
||||
@@ -428,9 +428,9 @@ public class DiagnosticsTestWithOldJvmBackendGenerated extends AbstractDiagnosti
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/dataClassCopy.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaults.kt")
|
||||
public void testDefaults() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/defaults.kt");
|
||||
@TestMetadata("defaults_old.kt")
|
||||
public void testDefaults_old() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames/defaults_old.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationBy_old.kt")
|
||||
|
||||
Generated
-5
@@ -6977,11 +6977,6 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/dataClassCopy.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaults.kt")
|
||||
public void testDefaults() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/defaults.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("delegationBy.kt")
|
||||
public void testDelegationBy() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt");
|
||||
|
||||
+24
@@ -31,6 +31,12 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assertion.kt")
|
||||
public void testAssertion() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/assertion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
@@ -103,6 +109,24 @@ public class IrSteppingTestGenerated extends AbstractIrSteppingTest {
|
||||
runTest("compiler/testData/debug/stepping/recursion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleDefaultArg.kt")
|
||||
public void testSimpleDefaultArg() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/simpleDefaultArg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleDefaultArgWithInline.kt")
|
||||
public void testSimpleDefaultArgWithInline() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleInlineDefaultArg.kt")
|
||||
public void testSimpleInlineDefaultArg() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("throwException.kt")
|
||||
public void testThrowException() throws Exception {
|
||||
|
||||
+24
@@ -31,6 +31,12 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("assertion.kt")
|
||||
public void testAssertion() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/assertion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("callableReference.kt")
|
||||
public void testCallableReference() throws Exception {
|
||||
@@ -103,6 +109,24 @@ public class SteppingTestGenerated extends AbstractSteppingTest {
|
||||
runTest("compiler/testData/debug/stepping/recursion.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleDefaultArg.kt")
|
||||
public void testSimpleDefaultArg() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/simpleDefaultArg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleDefaultArgWithInline.kt")
|
||||
public void testSimpleDefaultArgWithInline() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/simpleDefaultArgWithInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("simpleInlineDefaultArg.kt")
|
||||
public void testSimpleInlineDefaultArg() throws Exception {
|
||||
runTest("compiler/testData/debug/stepping/simpleInlineDefaultArg.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("throwException.kt")
|
||||
public void testThrowException() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user