Mark line numbers for bridges in closures

This commit is contained in:
Natalia Ukhorskaya
2014-11-11 19:04:20 +03:00
parent 0a97481184
commit dab9411c5d
3 changed files with 51 additions and 4 deletions
@@ -245,6 +245,8 @@ public class ClosureCodegen extends ParentCodegenAware {
mv.visitCode();
InstructionAdapter iv = new InstructionAdapter(mv);
ImplementationBodyCodegen.markLineNumberForSyntheticFunction(DescriptorUtils.getParentOfType(funDescriptor, ClassDescriptor.class), iv);
iv.load(0, asmType);
ReceiverParameterDescriptor receiver = funDescriptor.getExtensionReceiverParameter();
@@ -2,10 +2,30 @@ LineBreakpoint created at syntheticMethods.kt:6
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! syntheticMethods.SyntheticMethodsPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
syntheticMethods.kt:6
syntheticMethods.kt:18
syntheticMethods.kt:19
syntheticMethods.kt:16
syntheticMethods.kt:20
syntheticMethods.kt:17
syntheticMethods.kt:7
syntheticMethods.kt:0
syntheticMethods.kt:7
syntheticMethods.kt:25
syntheticMethods.kt:31
syntheticMethods.kt:23
syntheticMethods.kt:26
syntheticMethods.kt:23
syntheticMethods.kt:31
syntheticMethods.kt:32
syntheticMethods.kt:28
syntheticMethods.kt:8
syntheticMethods.kt:36
syntheticMethods.kt:42
syntheticMethods.kt:34
syntheticMethods.kt:37
syntheticMethods.kt:34
syntheticMethods.kt:42
syntheticMethods.kt:43
syntheticMethods.kt:39
syntheticMethods.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -4,7 +4,8 @@ fun main(args: Array<String>) {
val d: Base<String> = Derived()
//Breakpoint!
d.foo("")
val a = 1
A().test()
A.test()
}
open class Base<T> {
@@ -19,4 +20,28 @@ class Derived: Base<String>() {
}
}
// STEP_INTO: 4
class A {
fun test() {
lambda {
val a = 1
}
}
fun lambda(f: () -> Unit) {
f()
}
class object {
fun test() {
lambda {
val a = 1
}
}
fun lambda(f: () -> Unit) {
f()
}
}
}
// STEP_INTO: 24