JVM IR: Avoid direct invokes in callable reference tests
Due to the direct invoke optimization, most callable reference tests were not generating callable references/lambdas.
This commit is contained in:
committed by
Alexander Udalov
parent
f0238766df
commit
7d59c7689c
+1
-1
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
class Outer (val x: String) {
|
||||
inner class Inner(val y: String) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
class C(val x: String) {
|
||||
fun foo(s: String) = x + s
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
class C(x: String, y: String) {
|
||||
val yx = y + x
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
fun box() =
|
||||
{ k: String ->
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
fun box() =
|
||||
(fun (s: String): String {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
fun ok(s: String) = "O" + s
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
fun box() =
|
||||
{ s: String ->
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 Function(^.)*.invoke
|
||||
// 0 invoke
|
||||
|
||||
class Outer (val x: String) {
|
||||
inner class Inner(val y: String) {
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// JVM_IR_TEMPLATES
|
||||
// 0 invoke
|
||||
|
||||
fun box(): String =
|
||||
(String::plus)("O", "K")
|
||||
|
||||
Reference in New Issue
Block a user