JVM: Improve line number handling for suspend calls.
Take branching and method calls into account when finding the line number of the continuation. If there is no line number before branching instructions or method calls, the following code is still on the line of the suspend call itself. This fixes a couple of issues with incorrect line numbers for multiple throws on the same line or multipe suspend calls on the same line. In addition, it avoids the need to spam the method node with repeated line number instructions in the IR backend.
This commit is contained in:
+10
@@ -6935,10 +6935,20 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/debug/fqName.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleSuspendCallsOnSameLine.kt")
|
||||
public void testMultipleSuspendCallsOnSameLine() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/debug/multipleSuspendCallsOnSameLine.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("runtimeDebugMetadata.kt")
|
||||
public void testRuntimeDebugMetadata() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/debug/runtimeDebugMetadata.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("throwsOnSameLine.kt")
|
||||
public void testThrowsOnSameLine() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/debug/throwsOnSameLine.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection")
|
||||
|
||||
Reference in New Issue
Block a user