Do not use visitor for counting lambda ordinal for debugger
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:6 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:11 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:17 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:23 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambdaInLibrary.kt:31 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:9 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:17 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:25 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:33 lambdaOrdinal = 0
|
||||
LineBreakpoint created at isInsideInlineLambda.kt:43 lambdaOrdinal = 0
|
||||
!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! isInsideInlineLambda.IsInsideInlineLambdaKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
isInsideInlineLambda.kt:9
|
||||
Compile bytecode for it + 1
|
||||
isInsideInlineLambda.kt:17
|
||||
Compile bytecode for it + 2
|
||||
isInsideInlineLambda.kt:25
|
||||
Compile bytecode for it + 3
|
||||
isInsideInlineLambda.kt:33
|
||||
Compile bytecode for it + 4
|
||||
isInsideInlineLambda.kt:43
|
||||
Compile bytecode for it + 5
|
||||
isInsideInlineLambdaInLibrary.kt:6
|
||||
Compile bytecode for it + 11
|
||||
isInsideInlineLambdaInLibrary.kt:11
|
||||
Compile bytecode for it + 12
|
||||
isInsideInlineLambdaInLibrary.kt:17
|
||||
Compile bytecode for it + 13
|
||||
isInsideInlineLambdaInLibrary.kt:23
|
||||
Compile bytecode for it + 14
|
||||
isInsideInlineLambdaInLibrary.kt:31
|
||||
Compile bytecode for it + 15
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -17,6 +17,7 @@ stepOverIfWithInline.kt:24
|
||||
stepOverIfWithInline.kt:28
|
||||
stepOverIfWithInline.kt:41
|
||||
stepOverIfWithInline.kt:28
|
||||
stepOverIfWithInline.kt:28
|
||||
stepOverIfWithInline.kt:32
|
||||
stepOverIfWithInline.kt:41
|
||||
stepOverIfWithInline.kt:32
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package isInsideInlineLambda
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A()
|
||||
|
||||
// EXPRESSION: it + 1
|
||||
// RESULT: 2: I
|
||||
//Breakpoint! (0)
|
||||
a.foo(1) { 1 }
|
||||
|
||||
|
||||
// inside other lambda
|
||||
a.foo(1) {
|
||||
// EXPRESSION: it + 2
|
||||
// RESULT: 3: I
|
||||
//Breakpoint! (0)
|
||||
a.foo(1) { 1 }
|
||||
1
|
||||
}
|
||||
|
||||
// inside variable declaration
|
||||
// EXPRESSION: it + 3
|
||||
// RESULT: 4: I
|
||||
//Breakpoint! (0)
|
||||
val x = a.foo(1) { 1 }
|
||||
|
||||
// inside object declaration
|
||||
val y = object {
|
||||
fun foo() {
|
||||
// EXPRESSION: it + 4
|
||||
// RESULT: 5: I
|
||||
//Breakpoint! (0)
|
||||
a.foo(1) { 1 }
|
||||
}
|
||||
}
|
||||
y.foo()
|
||||
|
||||
// inside local function
|
||||
fun local() {
|
||||
// EXPRESSION: it + 5
|
||||
// RESULT: 6: I
|
||||
//Breakpoint! (0)
|
||||
a.foo(1) { 1 }
|
||||
}
|
||||
local()
|
||||
|
||||
isInsideInlineLambdaInLibrary.test()
|
||||
}
|
||||
|
||||
class A {
|
||||
inline fun foo(i: Int, f: (i: Int) -> Int): A {
|
||||
f(i)
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint1:(0)
|
||||
// EXPRESSION: it + 11
|
||||
// RESULT: 12: I
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint2:(0)
|
||||
// EXPRESSION: it + 12
|
||||
// RESULT: 14: I
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint3:(0)
|
||||
// EXPRESSION: it + 13
|
||||
// RESULT: 16: I
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint4:(0)
|
||||
// EXPRESSION: it + 14
|
||||
// RESULT: 18: I
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: isInsideInlineLambdaInLibrary.kt:Breakpoint5:(0)
|
||||
// EXPRESSION: it + 15
|
||||
// RESULT: 20: I
|
||||
+1
-1
@@ -44,4 +44,4 @@ inline fun foo(f: () -> Int): Int {
|
||||
|
||||
fun test(i: Int) = 1
|
||||
|
||||
// STEP_OVER: 21
|
||||
// STEP_OVER: 22
|
||||
Reference in New Issue
Block a user