Fix breakpoints in function literals in inline calls (KT-11521, KT-12734, KT-12470)

#KT-11521 Fixed
 #KT-12734 Fixed
 #KT-12470 Fixed
This commit is contained in:
Nikolay Krasko
2016-11-16 16:28:22 +03:00
committed by Nikolay Krasko
parent 59a349a4ae
commit 1889f4f7b1
21 changed files with 394 additions and 10 deletions
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInInlineCallLocalFunLambda.kt:9
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInInlineCallLocalFunLambda.StopInInlineCallLocalFunLambdaKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInInlineCallLocalFunLambda.kt:9
stopInInlineCallLocalFunLambda.kt:10
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInInlinedInSpecialNamedFun.kt:10
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInInlinedInSpecialNamedFun.StopInInlinedInSpecialNamedFunKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInInlinedInSpecialNamedFun.kt:10
stopInInlinedInSpecialNamedFun.kt:11
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInInlinedInSpecialNamedFunWithGet.kt:10
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInInlinedInSpecialNamedFunWithGet.StopInInlinedInSpecialNamedFunWithGetKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInInlinedInSpecialNamedFunWithGet.kt:10
stopInInlinedInSpecialNamedFunWithGet.kt:11
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInLambdaInlineCallLambda.kt:9
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInLambdaInlineCallLambda.StopInLambdaInlineCallLambdaKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInLambdaInlineCallLambda.kt:9
stopInLambdaInlineCallLambda.kt:10
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInLocalFunInlineCallLambda.kt:9
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInLocalFunInlineCallLambda.StopInLocalFunInlineCallLambdaKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInLocalFunInlineCallLambda.kt:9
stopInLocalFunInlineCallLambda.kt:10
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInNonInlinedLambdaInInlineCallWithClosure.kt:8
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInNonInlinedLambdaInInlineCallWithClosure.StopInNonInlinedLambdaInInlineCallWithClosureKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInNonInlinedLambdaInInlineCallWithClosure.kt:8
stopInNonInlinedLambdaInInlineCallWithClosure.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInNonInlinedLambdaInInlineCallWithoutClosure.kt:8
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInNonInlinedLambdaInInlineCallWithoutClosure.StopInNonInlinedLambdaInInlineCallWithoutClosureKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInNonInlinedLambdaInInlineCallWithoutClosure.kt:8
stopInNonInlinedLambdaInInlineCallWithoutClosure.kt:9
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInObjectLiteralInInlineCallNoClosure.kt:12
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInObjectLiteralInInlineCallNoClosure.StopInObjectLiteralInInlineCallNoClosureKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInObjectLiteralInInlineCallNoClosure.kt:12
stopInObjectLiteralInInlineCallNoClosure.kt:13
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,8 @@
LineBreakpoint created at stopInObjectLiteralInInlineCallWithClosure.kt:12
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInObjectLiteralInInlineCallWithClosure.StopInObjectLiteralInInlineCallWithClosureKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stopInObjectLiteralInInlineCallWithClosure.kt:12
stopInObjectLiteralInInlineCallWithClosure.kt:13
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,21 @@
package stopInInlineCallLocalFunLambda
fun main(args: Array<String>) {
var prop = 1
inlineFun {
fun local() {
{
//Breakpoint!
foo(12)
}()
}
local()
}
}
inline fun inlineFun(f: () -> Unit) {
f()
}
fun foo(a: Any) {}
@@ -0,0 +1,24 @@
package stopInInlinedInSpecialNamedFun
// KT-12470
class Foo(bar: Bar) {
init {
with(bar) {
{
//Breakpoint!
nop()
nop()
}()
}
}
fun nop() {}
}
fun main(args: Array<String>) {
Foo(Bar())
}
class Bar
@@ -0,0 +1,28 @@
package stopInInlinedInSpecialNamedFunWithGet
// KT-12470
class Foo(bar: Bar) {
init {
with(bar) {
get<String> {
//Breakpoint!
nop()
nop()
}
}
}
private fun nop() {}
}
fun main(args: Array<String>) {
Foo(Bar())
}
class Bar
class BarContext
inline fun <reified T : Any> Bar.get(noinline body: BarContext.() -> Unit) {
BarContext().body()
}
@@ -0,0 +1,19 @@
package stopInLambdaInlineCallLambda
fun main(args: Array<String>) {
var prop = 1
{
inlineFun {
{
//Breakpoint!
foo(12)
}()
}
}()
}
inline fun inlineFun(f: () -> Unit) {
f()
}
fun foo(a: Any) {}
@@ -0,0 +1,21 @@
package stopInLocalFunInlineCallLambda
fun main(args: Array<String>) {
var prop = 1
fun local() {
inlineFun {
{
//Breakpoint!
foo(12)
}()
}
}
local()
}
inline fun inlineFun(f: () -> Unit) {
f()
}
fun foo(a: Any) {}
@@ -0,0 +1,22 @@
package stopInNonInlinedLambdaInInlineCallWithClosure
fun main(args: Array<String>) {
var prop = 1
inlineFun {
notInlineFun {
//Breakpoint!
foo(prop)
foo(prop)
}
}
}
inline fun inlineFun(f: () -> Unit) {
f()
}
fun notInlineFun(f: () -> Unit) {
f()
}
fun foo(a: Any) {}
@@ -0,0 +1,21 @@
package stopInNonInlinedLambdaInInlineCallWithoutClosure
fun main(args: Array<String>) {
var prop = 1
inlineFun {
notInlineFun {
//Breakpoint!
foo(12)
}
}
}
inline fun inlineFun(f: () -> Unit) {
f()
}
fun notInlineFun(f: () -> Unit) {
f()
}
fun foo(a: Any) {}
@@ -0,0 +1,23 @@
package stopInObjectLiteralInInlineCallNoClosure
// KT-12734
fun main(args: Array<String>) {
val a = 12
inlineF {
val s = object: () -> Unit {
override fun invoke() {
//Breakpoint!
nop()
nop()
}
}
s()
}
}
inline fun <R> inlineF(block: () -> R): R = block()
fun nop() {}
@@ -0,0 +1,23 @@
package stopInObjectLiteralInInlineCallWithClosure
// KT-12734
fun main(args: Array<String>) {
val a = 12
inlineF {
val s = object: () -> Unit {
override fun invoke() {
//Breakpoint!
nop(a)
nop(a)
}
}
s()
}
}
inline fun <R> inlineF(block: () -> R): R = block()
fun nop(a: Any) {}