FIR2IR: read & set dispatch & extension receivers

NB: this commit includes receiver-based assertions yet failing for some tests
This commit is contained in:
Mikhail Glukhikh
2019-08-28 13:49:24 +03:00
parent b531e535b6
commit 0d5cfa97a5
33 changed files with 73 additions and 170 deletions
@@ -73,6 +73,7 @@ FILE fqName:<root> fileName:/forWithImplicitReceivers.kt
RETURN type=kotlin.Nothing from='public open fun hasNext (): kotlin.Boolean declared in <root>.IReceiver'
CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
arg0: CALL 'public final fun <get-value> (): kotlin.Int declared in <root>.IntCell' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IntCell declared in <root>.IntCell' type=<root>.IntCell origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:next visibility:public modality:OPEN <> ($this:<root>.IReceiver, $receiver:<root>.IntCell) returnType:kotlin.Int
$this: VALUE_PARAMETER name:<this> type:<root>.IReceiver
@@ -82,7 +83,9 @@ FILE fqName:<root> fileName:/forWithImplicitReceivers.kt
BLOCK type=kotlin.Int origin=null
VAR name:<unary> type:kotlin.Int [val]
CALL 'public final fun <get-value> (): kotlin.Int declared in <root>.IntCell' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IntCell declared in <root>.IntCell' type=<root>.IntCell origin=null
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:public' type=kotlin.Unit origin=null
receiver: GET_VAR '<this>: <root>.IntCell declared in <root>.IntCell' type=<root>.IntCell origin=null
value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'val <unary>: kotlin.Int [val] declared in <root>.IReceiver.next' type=kotlin.Int origin=null
GET_VAR 'val <unary>: kotlin.Int [val] declared in <root>.IReceiver.next' type=kotlin.Int origin=null
@@ -106,13 +109,13 @@ FILE fqName:<root> fileName:/forWithImplicitReceivers.kt
GET_OBJECT 'CLASS OBJECT name:FiveTimes modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.FiveTimes
VAR name:<iterator> type:<root>.IntCell [val]
CALL 'public open fun iterator (): <root>.IntCell declared in <root>.IReceiver' type=<root>.IntCell origin=null
$this: GET_VAR 'val <range>: <root>.FiveTimes [val] declared in <root>.test' type=<root>.FiveTimes origin=null
$this: GET_VAR '<this>: <root>.IReceiver declared in <root>.IReceiver' type=<root>.IReceiver origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public open fun hasNext (): kotlin.Boolean declared in <root>.IReceiver' type=kotlin.Boolean origin=null
$this: GET_VAR 'val <iterator>: <root>.IntCell [val] declared in <root>.test' type=<root>.IntCell origin=null
$this: GET_VAR '<this>: <root>.IReceiver declared in <root>.IReceiver' type=<root>.IReceiver origin=null
body: BLOCK type=kotlin.Unit origin=null
VAR name:i type:kotlin.Int [val]
CALL 'public open fun next (): kotlin.Int declared in <root>.IReceiver' type=kotlin.Int origin=null
$this: GET_VAR 'val <iterator>: <root>.IntCell [val] declared in <root>.test' type=<root>.IntCell origin=null
$this: GET_VAR '<this>: <root>.IReceiver declared in <root>.IReceiver' type=<root>.IReceiver origin=null
CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
message: GET_VAR 'val i: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null