[JS IR] Improve debug info for suspend functions
- Map generated explicit Unit returns to the closing brace of the original body - Name the continuation parameter as `$completion` to match the JVM BE, and generate debug info for it (so that it appears in the 'names' array in sourcemaps) - Don't generate debug info for coroutine instantiation ceremony (so that the user doesn't need to step in many times to get where they want) #KT-46276
This commit is contained in:
committed by
Space Team
parent
4d9c2d3d14
commit
ec18dce7cb
+1
-1
@@ -15,4 +15,4 @@ suspend fun bar(): Unit {
|
||||
}
|
||||
|
||||
// LINES(JS): 39 4 4 4 7 5 5 45 45 5 93 45 5 5 6 4 4 4 9 15 9 9 9 * 9 15 10 10 11 11 11 11 11 * 11 12 12 13 13 13 13 13 13 13 14 14 * 9 15 9 9 9 9
|
||||
// LINES(JS_IR): 4 4 * 19 * 19 19 * 5 * 45 * 50 50 93 93 3 45 3 45 45 6 6 19 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 * 10 10 * 11 * 11 12 12 * 13 * 13 13 14 14
|
||||
// LINES(JS_IR): 4 4 * 19 * 19 19 * 5 * 45 * 50 50 93 93 3 45 3 45 45 6 6 19 19 7 7 9 9 * 9 * 10 10 * 11 * 11 12 12 * 13 * 13 13 14 14 15 15
|
||||
|
||||
@@ -9,4 +9,4 @@ suspend fun delay() {
|
||||
}
|
||||
|
||||
// LINES(JS): 1 6 1 1 * 1 6 2 2 2 2 2 * 3 3 4 4 4 4 4 5 5 * 1 6 1 1 1 1 8 9
|
||||
// LINES(JS_IR): 1 1 1 1 1 1 1 1 1 1 8 8 * 1 1 1 1 1 * 2 * 3 3 3 * 5 5
|
||||
// LINES(JS_IR): 1 1 * 8 8 9 9 * 1 * 2 * 3 3 3 * 5 5 6 6
|
||||
|
||||
Reference in New Issue
Block a user