KT-57491 Prefix context receivers with $context_receiver_

This commit is contained in:
Pavel Mikhailovskii
2023-03-23 16:23:09 +00:00
committed by Space Team
parent f3592088fe
commit 0e6da53af8
82 changed files with 920 additions and 919 deletions
@@ -111,18 +111,18 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:operationScore type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: kotlin.Int declared in <root>.<set-operationScore>' type=kotlin.Int origin=null
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.Int [operator]
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, $context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.Int [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun get (_context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>'
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.get' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>'
WHEN type=kotlin.Int origin=IF
BRANCH
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
@@ -133,17 +133,17 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int, other:<root>.MyContainer) returnType:kotlin.Unit [operator]
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, $context_receiver_0:kotlin.Int, other:<root>.MyContainer) returnType:kotlin.Unit [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:other index:1 type:<root>.MyContainer
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.MyContainer [val]
GET_VAR '<this>: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
@@ -154,17 +154,17 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
$this: GET_VAR 'val tmp_1: <root>.MyContainer [val] declared in <root>.plusAssign' type=<root>.MyContainer origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'other: <root>.MyContainer declared in <root>.plusAssign' type=<root>.MyContainer origin=null
FUN name:inc visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, _context_receiver_0:kotlin.Int) returnType:<root>.MyContainer [operator]
FUN name:inc visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, $context_receiver_0:kotlin.Int) returnType:<root>.MyContainer [operator]
contextReceiverParametersCount: 1
$receiver: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
other: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.inc' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun inc (_context_receiver_0: kotlin.Int): <root>.MyContainer [operator] declared in <root>'
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.inc' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun inc ($context_receiver_0: kotlin.Int): <root>.MyContainer [operator] declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.MyContainer' type=kotlin.Int origin=GET_PROPERTY
@@ -183,20 +183,20 @@ FILE fqName:<root> fileName:/arrayAccessCompositeOperators.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
CALL 'public final fun plusAssign (_context_receiver_0: kotlin.Int, other: <root>.MyContainer): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
CALL 'public final fun plusAssign ($context_receiver_0: kotlin.Int, other: <root>.MyContainer): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'var myContainer: <root>.MyContainer [var] declared in <root>.box' type=<root>.MyContainer origin=PLUSEQ
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
i: CALL 'public final fun get (_context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=GET_ARRAY_ELEMENT
i: CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=GET_ARRAY_ELEMENT
$receiver: BLOCK type=<root>.MyContainer origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.MyContainer [val]
GET_VAR 'var myContainer: <root>.MyContainer [var] declared in <root>.box' type=<root>.MyContainer origin=POSTFIX_INCR
SET_VAR 'var myContainer: <root>.MyContainer [var] declared in <root>.box' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (_context_receiver_0: kotlin.Int): <root>.MyContainer [operator] declared in <root>' type=<root>.MyContainer origin=POSTFIX_INCR
CALL 'public final fun inc ($context_receiver_0: kotlin.Int): <root>.MyContainer [operator] declared in <root>' type=<root>.MyContainer origin=POSTFIX_INCR
$receiver: GET_VAR 'val tmp_2: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
index: CONST Int type=kotlin.Int value=0
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
WHEN type=kotlin.String origin=IF