Debugger: Support Kotlin variables for inlined lambdas inside inline functions (KT-31418)

This commit is contained in:
Yan Zhulanow
2019-05-22 17:27:23 +09:00
parent afa0bec6f6
commit b4f515a436
8 changed files with 63 additions and 15 deletions
@@ -16,7 +16,7 @@ Compile bytecode for element
local = $i$f$inlineFun: int = undefined (sp = null)
local = element$iv$iv: double = 1.0 (sp = frameInlineArgumentInsideInlineFun.kt, 13)
local = it$iv: int = 1 (sp = null)
local = $i$a$-inlineFun-B$foo$1: int = undefined (sp = null)
local = $i$a$-inlineFun-B$foo$1$iv: int = undefined (sp = null)
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
package nestedInlineFun2
fun main() {
val a = 1
foo {
val b = 2
}
}
inline fun foo(block: () -> Unit) {
val x = 3
bar(1) {
val y = 2
//Breakpoint!
block()
}
}
inline fun bar(count: Int, block: () -> Unit) {
var i = count
while (i-- > 0) {
block()
}
}
// SHOW_KOTLIN_VARIABLES
// PRINT_FRAME
@@ -0,0 +1,10 @@
LineBreakpoint created at nestedInlineFun2.kt:15
Run Java
Connected to the target VM
nestedInlineFun2.kt:15
frame = main:15, NestedInlineFun2Kt {nestedInlineFun2}
local = x: int = 3 (sp = nestedInlineFun2.kt, 11)
local = y: int = 2 (sp = nestedInlineFun2.kt, 13)
Disconnected from the target VM
Process finished with exit code 0