JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs

This commit is contained in:
Dmitry Petrov
2021-04-26 17:17:25 +03:00
committed by teamcityserver
parent bfb1a06f3d
commit 851980e36f
124 changed files with 1340 additions and 324 deletions
@@ -19,16 +19,17 @@ object B {
// FILE: 2.kt
import test.*
fun <T> eval(f: () -> T) = f()
fun box(): String {
var z = "fail"
B.test2 {
{ // regenerated object in inline lambda
eval { // regenerated object in inline lambda
A.test {
z = "OK"
}
}()
}
}
return z;
}
@@ -11,14 +11,14 @@ _2Kt
+ 2 1.kt
test/B
*L
1#1,36:1
15#2,2:37
1#1,37:1
15#2,2:38
*S KotlinDebug
*F
+ 1 2.kt
_2Kt
*L
26#1:37,2
27#1:38,2
*E
SMAP
@@ -31,13 +31,13 @@ _2Kt$box$1$1
+ 2 1.kt
test/A
*L
1#1,36:1
9#2,2:37
1#1,37:1
9#2,2:38
*S KotlinDebug
*F
+ 1 2.kt
_2Kt$box$1$1
*L
28#1:37,2
29#1:38,2
*E