Standardize context receiver parameter names

Previously, FIR used `_context_receiver_n` while FE10 used `<this>` for
all context receiver parameters. This commit changes the code in FE10
to follow the convention from FIR.
This commit is contained in:
Steven Schäfer
2022-10-04 15:19:30 +02:00
committed by Alexander Udalov
parent 5cf1a88c42
commit 21fef70367
80 changed files with 544 additions and 1728 deletions
@@ -1,20 +1,20 @@
FILE fqName:<root> fileName:/overloading.kt
FUN name:foo visibility:public modality:FINAL <> (<this>:kotlin.Int, <this>:kotlin.String) returnType:kotlin.Int
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:kotlin.Int, _context_receiver_1:kotlin.String) returnType:kotlin.Int
contextReceiverParametersCount: 2
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:<this> index:1 type:kotlin.String
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_1 index:1 type:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (<this>: kotlin.Int, <this>: kotlin.String): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun foo (_context_receiver_0: kotlin.Int, _context_receiver_1: kotlin.String): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
$this: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:foo visibility:public modality:FINAL <> (<this>:kotlin.Int) returnType:kotlin.Int
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:kotlin.Int) returnType:kotlin.Int
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:kotlin.Int
VALUE_PARAMETER name:_context_receiver_0 index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun foo (<this>: kotlin.Int): kotlin.Int declared in <root>'
RETURN type=kotlin.Nothing from='public final fun foo (_context_receiver_0: kotlin.Int): kotlin.Int declared in <root>'
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUS
$this: GET_VAR '<this>: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
$this: GET_VAR '_context_receiver_0: kotlin.Int declared in <root>.foo' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -28,5 +28,5 @@ FILE fqName:<root> fileName:/overloading.kt
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.Int declared in <root>.test'
CALL 'public final fun foo (<this>: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
<this>: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null
CALL 'public final fun foo (_context_receiver_0: kotlin.Int): kotlin.Int declared in <root>' type=kotlin.Int origin=null
_context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.test.<anonymous>' type=kotlin.Int origin=null