JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs
This commit is contained in:
committed by
teamcityserver
parent
bfb1a06f3d
commit
851980e36f
+4
-2
@@ -18,15 +18,17 @@ inline fun test2(s: () -> String): String {
|
||||
|
||||
import test.*
|
||||
|
||||
fun <T> eval(f: () -> T) = f()
|
||||
|
||||
fun box(): String {
|
||||
var result = "fail"
|
||||
|
||||
test {
|
||||
{
|
||||
eval {
|
||||
result = test2 {
|
||||
"OK"
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
+6
-6
@@ -11,14 +11,14 @@ _2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,34:1
|
||||
6#2,4:35
|
||||
1#1,36:1
|
||||
6#2,4:37
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
24#1:35,4
|
||||
26#1:37,4
|
||||
*E
|
||||
|
||||
SMAP
|
||||
@@ -31,13 +31,13 @@ _2Kt$box$1$1
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,34:1
|
||||
12#2,3:35
|
||||
1#1,36:1
|
||||
12#2,3:37
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt$box$1$1
|
||||
*L
|
||||
26#1:35,3
|
||||
28#1:37,3
|
||||
*E
|
||||
|
||||
|
||||
+4
-2
@@ -18,15 +18,17 @@ inline fun test2(s: () -> String): String {
|
||||
return res
|
||||
}
|
||||
|
||||
fun <T> eval(f: () -> T) = f()
|
||||
|
||||
fun box(): String {
|
||||
var result = "fail"
|
||||
|
||||
test {
|
||||
{
|
||||
eval {
|
||||
result = test2 {
|
||||
"OK"
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
Vendored
+6
-6
@@ -11,14 +11,14 @@ _2Kt
|
||||
+ 2 1.kt
|
||||
test/_1Kt
|
||||
*L
|
||||
1#1,34:1
|
||||
6#2,4:35
|
||||
1#1,36:1
|
||||
6#2,4:37
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
24#1:35,4
|
||||
26#1:37,4
|
||||
*E
|
||||
|
||||
SMAP
|
||||
@@ -31,13 +31,13 @@ _2Kt$box$1$1
|
||||
+ 2 2.kt
|
||||
_2Kt
|
||||
*L
|
||||
1#1,34:1
|
||||
16#2,3:35
|
||||
1#1,36:1
|
||||
16#2,3:37
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 2.kt
|
||||
_2Kt$box$1$1
|
||||
*L
|
||||
26#1:35,3
|
||||
28#1:37,3
|
||||
*E
|
||||
|
||||
|
||||
Reference in New Issue
Block a user