[JVM_IR] Generate line numbers in synthetic bridges.
The current backend does that for some bridges. We do it consistently for all bridges. The line number used differs. For the JVM_IR backend, we use the line number of the class to which the bridge is added. For the JVM backend, that does not appear to be the case for bridges in lambdas. I prefer the line number for a lambda invoke bridge to be the line for the lambda instead os some surrounding class.
This commit is contained in:
-13
@@ -16,37 +16,24 @@ fun box() {
|
||||
A.foo()
|
||||
}
|
||||
|
||||
// The JVM version hits get getProp line numbers twice. That appears
|
||||
// to be because the synthetic accessibility bridges (access$getProp0$cp)
|
||||
// have line numbers (of the start of the surrounding class) in the JVM
|
||||
// version and they do not have line numbers in the JVM_IR version.
|
||||
|
||||
// LINENUMBERS
|
||||
// test.kt:14 box
|
||||
// test.kt:5 <clinit>
|
||||
// test.kt:6 <clinit>
|
||||
// test.kt:5 getProp0
|
||||
// LINENUMBERS JVM
|
||||
// test.kt:5 getProp0
|
||||
// LINENUMBERS
|
||||
// test.kt:14 box
|
||||
// test.kt:15 box
|
||||
// test.kt:6 getProp1
|
||||
// LINENUMBERS JVM
|
||||
// test.kt:6 getProp1
|
||||
// LINENUMBERS
|
||||
// test.kt:15 box
|
||||
// test.kt:16 box
|
||||
// test.kt:8 foo
|
||||
// test.kt:5 getProp0
|
||||
// LINENUMBERS JVM
|
||||
// test.kt:5 getProp0
|
||||
// LINENUMBERS
|
||||
// test.kt:8 foo
|
||||
// test.kt:6 getProp1
|
||||
// LINENUMBERS JVM
|
||||
// test.kt:6 getProp1
|
||||
// LINENUMBERS
|
||||
// test.kt:8 foo
|
||||
// test.kt:16 box
|
||||
// test.kt:17 box
|
||||
|
||||
@@ -30,8 +30,6 @@ fun box() {
|
||||
A.s
|
||||
}
|
||||
|
||||
// JVM backend has extra steps for getX and getS.
|
||||
|
||||
// LINENUMBERS
|
||||
// test.kt:29 box
|
||||
// test.kt:7 <clinit>
|
||||
@@ -46,14 +44,10 @@ fun box() {
|
||||
// test.kt:21 <clinit>
|
||||
// test.kt:22 <clinit>
|
||||
// test.kt:11 getX
|
||||
// LINENUMBERS JVM
|
||||
// test.kt:11 getX
|
||||
// LINENUMBERS
|
||||
// test.kt:29 box
|
||||
// test.kt:30 box
|
||||
// test.kt:5 getS
|
||||
// LINENUMBERS JVM
|
||||
// test.kt:5 getS
|
||||
// LINENUMBERS
|
||||
// test.kt:30 box
|
||||
// test.kt:31 box
|
||||
|
||||
@@ -10,10 +10,19 @@ fun f(block: () -> Unit) {
|
||||
|
||||
fun g() {}
|
||||
|
||||
// The synthetic invoke bridge method generated for in the callable reference has line numbers
|
||||
// in the JVM_IR backend (as all bridges). In the JVM backend, only some bridges have line numbers.
|
||||
// For some reason, when the bridge does not have line numbers, there is no method entry event
|
||||
// for the invoke method bridged to. Therefore, the entry line number for invoke only shows
|
||||
// up for JVM_IR.
|
||||
|
||||
// LINENUMBERS
|
||||
// test.kt:3 box
|
||||
// test.kt:4 box
|
||||
// test.kt:8 f
|
||||
// LINENUMBERS JVM_IR
|
||||
// test.kt:4 invoke
|
||||
// LINENUMBERS
|
||||
// test.kt:11 g
|
||||
// test.kt:4 invoke
|
||||
// test.kt:8 f
|
||||
|
||||
Reference in New Issue
Block a user