[FIR] Support dispatch & extension receiver in component calls

This commit is contained in:
Mikhail Glukhikh
2020-04-08 17:08:03 +03:00
parent a93c7a39e0
commit cd5a4900e6
35 changed files with 25 additions and 45 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C(val i: Int) {
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C(val i: Int) {
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A<T>(val x: String, val y: String, val z: T)
fun <T> foo(a: A<T>, block: (A<T>) -> String): String = block(a)
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
class C(val i: Int) {
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// KJS_WITH_FULL_RUNTIME
class C(val i: Int) {
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Range(val from : C, val to: C) {
operator fun iterator() = It(from, to)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Range(val from : C, val to: C) {
operator fun iterator() = It(from, to)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Range(val from : C, val to: C) {
operator fun iterator() = It(from, to)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Range(val from : C, val to: C) {
operator fun iterator() = It(from, to)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Range(val from : C, val to: C) {
operator fun iterator() = It(from, to)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class Range(val from : C, val to: C) {
operator fun iterator() = It(from, to)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Int.component1() = this + 1
operator fun Int.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class M {
operator fun Long.component1() = this + 1
operator fun Long.component2() = this + 2
@@ -56,9 +56,9 @@ FILE fqName:<root> fileName:/destructuring1.kt
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
VAR name:x type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int [operator] declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
$this: GET_VAR '<this>: <root>.B declared in <root>.test' type=<root>.B origin=null
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
VAR name:y type:kotlin.Int [val]
CALL 'public final fun component2 (): kotlin.Int [operator] declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
$this: GET_VAR '<this>: <root>.B declared in <root>.test' type=<root>.B origin=null
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
@@ -62,13 +62,13 @@ FILE fqName:<root> fileName:/destructuringWithUnderscore.kt
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
VAR name:x type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int [operator] declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
$this: GET_VAR '<this>: <root>.B declared in <root>.test' type=<root>.B origin=null
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
VAR name:_ type:kotlin.Int [val]
CALL 'public final fun component2 (): kotlin.Int [operator] declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
$this: GET_VAR '<this>: <root>.B declared in <root>.test' type=<root>.B origin=null
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
VAR name:z type:kotlin.Int [val]
CALL 'public final fun component3 (): kotlin.Int [operator] declared in <root>.B' type=kotlin.Int origin=null
$this: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null
$this: GET_VAR '<this>: <root>.B declared in <root>.test' type=<root>.B origin=null
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test' type=<root>.A origin=null