IR: Collapse desugared blocks as a postprocessing pass.
This commit is contained in:
committed by
Dmitry Petrov
parent
aa7bf4637b
commit
c4bbcadb34
@@ -28,11 +28,10 @@ IrFile /callWithReorderedArguments.kt
|
||||
CALL .foo type=kotlin.Unit operator=
|
||||
a: CALL .noReorder1 type=kotlin.Int operator=
|
||||
b: CALL .noReorder2 type=kotlin.Int operator=
|
||||
BLOCK type=kotlin.Unit hasResult=false isDesugared=true
|
||||
VAR val tmp0: kotlin.Int
|
||||
CALL .reordered1 type=kotlin.Int operator=
|
||||
VAR val tmp1: kotlin.Int
|
||||
CALL .reordered2 type=kotlin.Int operator=
|
||||
CALL .foo type=kotlin.Unit operator=
|
||||
a: GET_VAR tmp1 type=kotlin.Int
|
||||
b: GET_VAR tmp0 type=kotlin.Int
|
||||
VAR val tmp0: kotlin.Int
|
||||
CALL .reordered1 type=kotlin.Int operator=
|
||||
VAR val tmp1: kotlin.Int
|
||||
CALL .reordered2 type=kotlin.Int operator=
|
||||
CALL .foo type=kotlin.Unit operator=
|
||||
a: GET_VAR tmp1 type=kotlin.Int
|
||||
b: GET_VAR tmp0 type=kotlin.Int
|
||||
|
||||
+10
-11
@@ -1,14 +1,13 @@
|
||||
IrFunction public fun B.test(): kotlin.Unit
|
||||
IrExpressionBody
|
||||
BLOCK type=kotlin.Unit hasResult=false isDesugared=false
|
||||
BLOCK type=kotlin.Unit hasResult=false isDesugared=true
|
||||
VAR val tmp0: A
|
||||
GET_VAR A type=A
|
||||
VAR val x: kotlin.Int
|
||||
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
|
||||
$this: $RECEIVER of: test type=B
|
||||
$receiver: GET_VAR tmp0 type=A
|
||||
VAR val y: kotlin.Int
|
||||
CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2)
|
||||
$this: $RECEIVER of: test type=B
|
||||
$receiver: GET_VAR tmp0 type=A
|
||||
VAR val tmp0: A
|
||||
GET_VAR A type=A
|
||||
VAR val x: kotlin.Int
|
||||
CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1)
|
||||
$this: $RECEIVER of: test type=B
|
||||
$receiver: GET_VAR tmp0 type=A
|
||||
VAR val y: kotlin.Int
|
||||
CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2)
|
||||
$this: $RECEIVER of: test type=B
|
||||
$receiver: GET_VAR tmp0 type=A
|
||||
|
||||
Reference in New Issue
Block a user