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
@@ -29,13 +29,13 @@ FILE fqName:<root> fileName:/function.kt
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN name:foo visibility:public modality:FINAL <> (<this>:<root>.C) returnType:kotlin.Unit
FUN name:foo visibility:public modality:FINAL <> (_context_receiver_0:<root>.C) returnType:kotlin.Unit
contextReceiverParametersCount: 1
VALUE_PARAMETER name:<this> index:0 type:<root>.C
VALUE_PARAMETER name:_context_receiver_0 index:0 type:<root>.C
BLOCK_BODY
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
CALL 'public final fun <get-c> (): kotlin.Int declared in <root>.C' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.C declared in <root>.foo' type=<root>.C origin=null
$this: GET_VAR '_context_receiver_0: <root>.C declared in <root>.foo' type=<root>.C origin=null
FUN name:bar visibility:public modality:FINAL <> (c:<root>.C) returnType:kotlin.Unit
VALUE_PARAMETER name:c index:0 type:<root>.C
BLOCK_BODY
@@ -47,5 +47,5 @@ FILE fqName:<root> fileName:/function.kt
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.C) returnType:kotlin.Unit
$receiver: VALUE_PARAMETER name:$this$with type:<root>.C
BLOCK_BODY
CALL 'public final fun foo (<this>: <root>.C): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
<this>: GET_VAR '$this$with: <root>.C declared in <root>.bar.<anonymous>' type=<root>.C origin=null
CALL 'public final fun foo (_context_receiver_0: <root>.C): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
_context_receiver_0: GET_VAR '$this$with: <root>.C declared in <root>.bar.<anonymous>' type=<root>.C origin=null