JVM_IR KT-45103 optimize direct invoke for lambdas and callable refs
This commit is contained in:
committed by
teamcityserver
parent
bfb1a06f3d
commit
851980e36f
+13
-10
@@ -1,11 +1,11 @@
|
||||
fun box(): String {
|
||||
var encl1 = "fail";
|
||||
test {
|
||||
{
|
||||
{
|
||||
encl1 = "OK"
|
||||
}()
|
||||
}()
|
||||
val lam1 = {
|
||||
val lam2 = { encl1 = "OK" }
|
||||
lam2()
|
||||
}
|
||||
lam1()
|
||||
}
|
||||
|
||||
return encl1
|
||||
@@ -31,7 +31,7 @@ inline fun test(crossinline s: () -> Unit) {
|
||||
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$1\$1\$lambda\$1\$1\s
|
||||
|
||||
// NB JVM_IR generates
|
||||
// final static INNERCLASS Kt10259_3Kt$box$1$1 null null
|
||||
// final static INNERCLASS Kt10259_3Kt$box$1$lam1$1 null null
|
||||
// public final static INNERCLASS Kt10259_3Kt$test$1 null null
|
||||
// in Kt10259_3Kt.
|
||||
// Although Oracle JVM doesn't check for consistency of InnerClasses attributes,
|
||||
@@ -39,7 +39,10 @@ inline fun test(crossinline s: () -> Unit) {
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 14 INNERCLASS
|
||||
// 3 INNERCLASS Kt10259_3Kt\$box\$1\$1\s
|
||||
// 2 INNERCLASS Kt10259_3Kt\$box\$1\$1\$1\s
|
||||
// 3 INNERCLASS Kt10259_3Kt\$test\$1\s
|
||||
// 2 INNERCLASS Kt10259_3Kt\$test\$1\$1\s
|
||||
// 3 INNERCLASS Kt10259_3Kt\$box\$1\$lam1\$1 null null
|
||||
// 2 INNERCLASS Kt10259_3Kt\$box\$1\$lam1\$1\$lam2\$1 null null
|
||||
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$1 null null
|
||||
// 2 INNERCLASS Kt10259_3Kt\$box\$\$inlined\$test\$1\$1 null null
|
||||
// 3 INNERCLASS Kt10259_3Kt\$test\$1 null null
|
||||
// 2 INNERCLASS Kt10259_3Kt\$test\$1\$1 null null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user