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
@@ -46,16 +46,16 @@ var operationScore: Int
get
set
operator fun Result.unaryMinus(<this>: Int): Result {
operator fun Result.unaryMinus(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().unaryMinus())
}
operator fun Result.unaryPlus(<this>: Int): Result {
operator fun Result.unaryPlus(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = when {
less(arg0 = <this>.<get-i>(), arg1 = 0) -> <this>.<get-i>().unaryMinus()
@@ -63,16 +63,16 @@ operator fun Result.unaryPlus(<this>: Int): Result {
})
}
operator fun Result.inc(<this>: Int): Result {
operator fun Result.inc(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().plus(other = 1))
}
operator fun Result.dec(<this>: Int): Result {
operator fun Result.dec(_context_receiver_0: Int): Result {
{ // BLOCK
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = <this>))
<set-operationScore>(<set-?> = <get-operationScore>().plus(other = _context_receiver_0))
}
return Result(i = <this>.<get-i>().minus(other = 1))
}
@@ -82,19 +82,19 @@ fun box(): String {
with<Int, Result>(receiver = 1, block = local fun Int.<anonymous>(): Result {
{ // BLOCK
val tmp0: Result = result
result = tmp0.inc(<this> = $this$with)
result = tmp0.inc(_context_receiver_0 = $this$with)
tmp0
} /*~> Unit */
{ // BLOCK
val tmp1: Result = result
result = tmp1.inc(<this> = $this$with)
result = tmp1.inc(_context_receiver_0 = $this$with)
tmp1
} /*~> Unit */
result.unaryMinus(<this> = $this$with) /*~> Unit */
result.unaryPlus(<this> = $this$with) /*~> Unit */
result.unaryMinus(_context_receiver_0 = $this$with) /*~> Unit */
result.unaryPlus(_context_receiver_0 = $this$with) /*~> Unit */
return { // BLOCK
val tmp2: Result = result
result = tmp2.dec(<this> = $this$with)
result = tmp2.dec(_context_receiver_0 = $this$with)
tmp2
}
}