JVM_IR: Generate as much LINENUMBER information as possible inside

suspend functions and lambdas.

Otherwise, when state-machine builder splits instructions and adds
LINENUMBER between states, the information becomes corrupted.
This commit is contained in:
Ilmir Usmanov
2019-09-24 21:37:51 +03:00
parent 69a9559eac
commit f4a7c839d3
6 changed files with 128 additions and 2 deletions
@@ -6880,6 +6880,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/coroutines/debug/debuggerMetadata.kt");
}
@TestMetadata("debuggerMetadata_ir.kt")
public void testDebuggerMetadata_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/debug/debuggerMetadata_ir.kt");
}
@TestMetadata("elvisLineNumber.kt")
public void testElvisLineNumber() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/debug/elvisLineNumber.kt");
@@ -6867,6 +6867,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Debug extends AbstractLightAnalysisModeTest {
@TestMetadata("debuggerMetadata_ir.kt")
public void ignoreDebuggerMetadata_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/debug/debuggerMetadata_ir.kt");
}
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@@ -6335,6 +6335,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/coroutines/debug/debuggerMetadata.kt");
}
@TestMetadata("debuggerMetadata_ir.kt")
public void testDebuggerMetadata_ir() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/debug/debuggerMetadata_ir.kt");
}
@TestMetadata("elvisLineNumber.kt")
public void testElvisLineNumber() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/debug/elvisLineNumber.kt");