Rematerialize simple expressions (local variables, literals, $this, $receiver) when generating calls.

This commit is contained in:
Dmitry Petrov
2016-08-17 13:09:59 +03:00
committed by Dmitry Petrov
parent c1583c4368
commit 287d804131
10 changed files with 118 additions and 46 deletions
+4 -8
View File
@@ -4,16 +4,12 @@ IrFile /arrayAugmentedAssignment2.kt
IrFunction public fun IB.test(/*0*/ a: IA): kotlin.Unit
IrExpressionBody
BLOCK type=<no-type> hasResult=false isDesugared=false
VAR val tmp0_array: IA
GET_VAR a type=IA
VAR val tmp1_index0: kotlin.String
LITERAL String type=kotlin.String value=''
CALL .set type=kotlin.Unit operator=PLUSEQ
$this: $RECEIVER of: test type=IB
$receiver: GET_VAR tmp0_array type=IA
index: GET_VAR tmp1_index0 type=kotlin.String
$receiver: GET_VAR a type=IA
index: LITERAL String type=kotlin.String value=''
value: CALL .plus type=kotlin.Int operator=PLUSEQ
$this: CALL .get type=kotlin.Int operator=PLUSEQ
$this: GET_VAR tmp0_array type=IA
index: GET_VAR tmp1_index0 type=kotlin.String
$this: GET_VAR a type=IA
index: LITERAL String type=kotlin.String value=''
other: LITERAL Int type=kotlin.Int value='42'