Further refinements in variable displaying (Kotlin mode)
- Remove synthetic outer this for lambdas - Recognize captured this for interface default methods
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
package defaultImplsMangling
|
||||
|
||||
interface IFoo {
|
||||
val x: Int
|
||||
|
||||
fun foo() {
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
}
|
||||
|
||||
class Foo : IFoo {
|
||||
override val x: Int = 1
|
||||
}
|
||||
|
||||
fun main() {
|
||||
Foo().foo()
|
||||
}
|
||||
|
||||
// SHOW_KOTLIN_VARIABLES
|
||||
// PRINT_FRAME
|
||||
|
||||
// EXPRESSION: x
|
||||
// RESULT: 1: I
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at defaultImplsMangling.kt:8
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
defaultImplsMangling.kt:8
|
||||
Compile bytecode for x
|
||||
frame = foo:8, IFoo$DefaultImpls {defaultImplsMangling}
|
||||
local = this: defaultImplsMangling.IFoo = {defaultImplsMangling.Foo@uniqueID} (sp = null)
|
||||
field = x: int = 1 (sp = defaultImplsMangling.kt, 13)
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package lambdaThisMangling
|
||||
|
||||
private fun block(block: (String) -> Unit) {
|
||||
block("foo")
|
||||
}
|
||||
|
||||
fun main() {
|
||||
block { foo ->
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
}
|
||||
|
||||
// SHOW_KOTLIN_VARIABLES
|
||||
// PRINT_FRAME
|
||||
|
||||
// EXPRESSION: foo
|
||||
// RESULT: "foo": Ljava/lang/String;
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
LineBreakpoint created at lambdaThisMangling.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
lambdaThisMangling.kt:10
|
||||
Compile bytecode for foo
|
||||
frame = invoke:10, LambdaThisManglingKt$main$1 {lambdaThisMangling}
|
||||
local = foo: java.lang.String = foo (sp = lambdaThisMangling.kt, 8)
|
||||
field = value: char[] = {char[3]@uniqueID} (sp = String.!EXT!)
|
||||
element = 0 = 'f' 102
|
||||
element = 1 = 'o' 111
|
||||
element = 2 = 'o' 111
|
||||
field = hash: int = 0 (sp = String.!EXT!)
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user