FIR: change callableId of fake overrides to derived class owner

This commit is contained in:
Mikhail Glukhikh
2020-02-26 15:42:12 +03:00
parent db7401d8eb
commit 096dc25701
37 changed files with 107 additions and 77 deletions
+6 -6
View File
@@ -175,22 +175,22 @@ FILE fqName:<root> fileName:/kt30020.kt
VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int
FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List<E of kotlin.collections.List>, element:kotlin.Int) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public abstract fun contains (element: E of kotlin.collections.MutableList): kotlin.Boolean [operator] declared in kotlin.collections.List
public abstract fun contains (element: E of kotlin.collections.MutableList): kotlin.Boolean [operator] declared in kotlin.collections.MutableList
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.List<E of kotlin.collections.List>
VALUE_PARAMETER name:element index:0 type:kotlin.Int
FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List<E of kotlin.collections.List>, elements:kotlin.collections.Collection<kotlin.Int>) returnType:kotlin.Boolean [fake_override]
overridden:
public abstract fun containsAll (elements: kotlin.collections.Collection<E of kotlin.collections.MutableList>): kotlin.Boolean declared in kotlin.collections.List
public abstract fun containsAll (elements: kotlin.collections.Collection<E of kotlin.collections.MutableList>): kotlin.Boolean declared in kotlin.collections.MutableList
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.List<E of kotlin.collections.List>
VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection<kotlin.Int>
FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List<E of kotlin.collections.List>, index:kotlin.Int) returnType:kotlin.Int [fake_override,operator]
overridden:
public abstract fun get (index: kotlin.Int): E of kotlin.collections.MutableList [operator] declared in kotlin.collections.List
public abstract fun get (index: kotlin.Int): E of kotlin.collections.MutableList [operator] declared in kotlin.collections.MutableList
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.List<E of kotlin.collections.List>
VALUE_PARAMETER name:index index:0 type:kotlin.Int
FUN FAKE_OVERRIDE name:indexOf visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List<E of kotlin.collections.List>, element:kotlin.Int) returnType:kotlin.Int [fake_override]
overridden:
public abstract fun indexOf (element: E of kotlin.collections.MutableList): kotlin.Int declared in kotlin.collections.List
public abstract fun indexOf (element: E of kotlin.collections.MutableList): kotlin.Int declared in kotlin.collections.MutableList
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.List<E of kotlin.collections.List>
VALUE_PARAMETER name:element index:0 type:kotlin.Int
FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List<E of kotlin.collections.List>) returnType:kotlin.Boolean [fake_override]
@@ -199,11 +199,11 @@ FILE fqName:<root> fileName:/kt30020.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.List<E of kotlin.collections.List>
FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableCollection<E of kotlin.collections.MutableCollection>) returnType:kotlin.collections.MutableIterator<kotlin.Int> [fake_override,operator]
overridden:
public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> [operator] declared in kotlin.collections.MutableCollection
public abstract fun iterator (): kotlin.collections.MutableIterator<E of kotlin.collections.MutableList> [operator] declared in kotlin.collections.MutableList
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.MutableCollection<E of kotlin.collections.MutableCollection>
FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List<E of kotlin.collections.List>, element:kotlin.Int) returnType:kotlin.Int [fake_override]
overridden:
public abstract fun lastIndexOf (element: E of kotlin.collections.MutableList): kotlin.Int declared in kotlin.collections.List
public abstract fun lastIndexOf (element: E of kotlin.collections.MutableList): kotlin.Int declared in kotlin.collections.MutableList
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.List<E of kotlin.collections.List>
VALUE_PARAMETER name:element index:0 type:kotlin.Int
PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val]
@@ -242,7 +242,7 @@ FILE fqName:<root> fileName:/useImportedMember.kt
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'public open fun fromInterface <T> (): T of <root>.I.fromInterface declared in <root>.I' type=kotlin.Int origin=null
arg0: CALL 'public open fun fromInterface <T> (): T of <root>.C.fromInterface declared in <root>.C' type=kotlin.Int origin=null
<T>: kotlin.Int
$this: CONST Int type=kotlin.Int value=9
$receiver: CONST Int type=kotlin.Int value=9
@@ -264,7 +264,8 @@ FILE fqName:<root> fileName:/useImportedMember.kt
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: CALL 'public open fun genericFromSuper (g: kotlin.String): kotlin.String declared in <root>.I' type=kotlin.String origin=null
arg0: CALL 'public open fun genericFromSuper (g: kotlin.String): kotlin.String declared in <root>.C' type=kotlin.String origin=null
$this: GET_OBJECT 'CLASS OBJECT name:C modality:FINAL visibility:public superTypes:[<root>.BaseClass; <root>.I<kotlin.String>]' type=<root>.C
g: CONST String type=kotlin.String value="11"
arg1: CONST String type=kotlin.String value="11"
then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
+1 -1
View File
@@ -27,7 +27,7 @@ FILE fqName:<root> fileName:/builtinMap.kt
$receiver: VALUE_PARAMETER name:<this> type:java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?>
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Unit declared in <root>.plus'
CALL 'public open fun put (p0: K1 of <root>.plus?, p1: V1 of <root>.plus?): V1 of <root>.plus? declared in java.util.HashMap' type=V1 of <root>.plus? origin=null
CALL 'public open fun put (p0: K1 of <root>.plus?, p1: V1 of <root>.plus?): V1 of <root>.plus? declared in java.util.LinkedHashMap' type=V1 of <root>.plus? origin=null
$this: GET_VAR '<this>: java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?> declared in special.<anonymous>' type=java.util.LinkedHashMap<K1 of <root>.plus?, V1 of <root>.plus?> origin=null
p0: CALL 'public final fun <get-first> (): K1 of <root>.plus declared in kotlin.Pair' type=K1 of <root>.plus origin=GET_PROPERTY
$this: GET_VAR 'pair: kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> declared in <root>.plus' type=kotlin.Pair<K1 of <root>.plus, V1 of <root>.plus> origin=null
@@ -15,7 +15,7 @@ FILE fqName:<root> fileName:/genericClassInDifferentModule_m2.kt
VALUE_PARAMETER name:y index:0 type:Y of <root>.Derived1.foo
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo <Y> (y: Y of <root>.Derived1.foo): T of <root>.Derived1 declared in <root>.Derived1'
CALL 'public final fun <get-x> (): T of <root>.Derived1 declared in <root>.Base' type=T of <root>.Derived1 origin=GET_PROPERTY
CALL 'public final fun <get-x> (): T of <root>.Derived1 declared in <root>.Derived1' type=T of <root>.Derived1 origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Derived1<T of <root>.Derived1> declared in <root>.Derived1.foo' type=<root>.Derived1<T of <root>.Derived1> origin=null
PROPERTY name:bar visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:bar type:T of <root>.Derived1 visibility:private
@@ -44,7 +44,7 @@ FILE fqName:<root> fileName:/genericClassInDifferentModule_m2.kt
$receiver: VALUE_PARAMETER name:<this> type:Z of <root>.Derived1.<get-exn>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-exn> <Z> (): T of <root>.Derived1 declared in <root>.Derived1'
CALL 'public final fun <get-x> (): T of <root>.Derived1 declared in <root>.Base' type=T of <root>.Derived1 origin=GET_PROPERTY
CALL 'public final fun <get-x> (): T of <root>.Derived1 declared in <root>.Derived1' type=T of <root>.Derived1 origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Derived1<T of <root>.Derived1> declared in <root>.Derived1.<get-exn>' type=<root>.Derived1<T of <root>.Derived1> origin=null
FUN name:<set-exn> visibility:public modality:FINAL <Z> ($this:<root>.Derived1<T of <root>.Derived1>, $receiver:Z of <root>.Derived1.<set-exn>, value:T of <root>.Derived1) returnType:kotlin.Unit
correspondingProperty: PROPERTY name:exn visibility:public modality:FINAL [var]
@@ -6,27 +6,27 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.MutableIterator<<root>.P?> [val]
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableCollection' type=kotlin.collections.MutableIterator<<root>.P?> origin=FOR_LOOP_ITERATOR
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<<root>.P?> origin=FOR_LOOP_ITERATOR
$this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<<root>.P?>? declared in <root>.J' type=kotlin.collections.List<<root>.P?>? origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testForInListUnused' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:x type:<root>.P? [val]
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.Iterator' type=<root>.P? origin=FOR_LOOP_NEXT
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.MutableIterator' type=<root>.P? origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_0: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testForInListUnused' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
FUN name:testForInListDestructured visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.MutableIterator<<root>.P?> [val]
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableCollection' type=kotlin.collections.MutableIterator<<root>.P?> origin=FOR_LOOP_ITERATOR
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<<root>.P?> origin=FOR_LOOP_ITERATOR
$this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<<root>.P?>? declared in <root>.J' type=kotlin.collections.List<<root>.P?>? origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:<destruct> type:<root>.P? [val]
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.Iterator' type=<root>.P? origin=FOR_LOOP_NEXT
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.MutableIterator' type=<root>.P? origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_1: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testForInListDestructured' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
VAR name:x type:kotlin.Int [val]
CALL 'public final fun component1 (): kotlin.Int declared in <root>.P' type=kotlin.Int origin=null
@@ -37,14 +37,14 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
FUN name:testDesugaredForInList visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:iterator type:kotlin.collections.MutableIterator<<root>.P?> [val]
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableCollection' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
$this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<<root>.P?>? declared in <root>.J' type=kotlin.collections.List<<root>.P?>? origin=null
WHILE label=null origin=WHILE_LOOP
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null
$this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testDesugaredForInList' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
body: BLOCK type=kotlin.Unit origin=WHILE_LOOP
VAR name:x type:<root>.P? [val]
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.Iterator' type=<root>.P? origin=null
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.MutableIterator' type=<root>.P? origin=null
$this: GET_VAR 'val iterator: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testDesugaredForInList' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
FUN name:testForInArrayUnused visibility:public modality:FINAL <> (j:<root>.J) returnType:kotlin.Unit
VALUE_PARAMETER name:j index:0 type:<root>.J
@@ -65,14 +65,14 @@ FILE fqName:<root> fileName:/enhancedNullabilityInForLoop.kt
BLOCK_BODY
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_3 type:kotlin.collections.MutableIterator<<root>.P?> [val]
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableCollection' type=kotlin.collections.MutableIterator<<root>.P?> origin=FOR_LOOP_ITERATOR
CALL 'public abstract fun iterator (): kotlin.collections.MutableIterator<<root>.P?> [operator] declared in kotlin.collections.MutableList' type=kotlin.collections.MutableIterator<<root>.P?> origin=FOR_LOOP_ITERATOR
$this: CALL 'public open fun listOfNotNull (): kotlin.collections.List<<root>.P?>? declared in <root>.J' type=kotlin.collections.List<<root>.P?>? origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
VAR FOR_LOOP_VARIABLE name:x type:<root>.P? [val]
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.Iterator' type=<root>.P? origin=FOR_LOOP_NEXT
CALL 'public abstract fun next (): T of kotlin.collections.MutableIterator [operator] declared in kotlin.collections.MutableIterator' type=<root>.P? origin=FOR_LOOP_NEXT
$this: GET_VAR 'val tmp_3: kotlin.collections.MutableIterator<<root>.P?> [val] declared in <root>.testForInListUse' type=kotlin.collections.MutableIterator<<root>.P?> origin=null
CALL 'public final fun use (s: <root>.P): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
s: GET_VAR 'val x: <root>.P? [val] declared in <root>.testForInListUse' type=<root>.P? origin=null