IR: Set when.origin for IrIfElseImpl

Change-Id: I38510b59e3dc936baadbfe3ef2702990493815e5
This commit is contained in:
Ting-Yuan Huang
2019-03-01 23:57:28 -08:00
committed by max-kammerer
parent 18198987a3
commit 6bbb0269b1
29 changed files with 98 additions and 86 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ BB 1
INCOMING <- BB 0, 4
Do..while entry: DO_WHILE label=null origin=DO_WHILE_LOOP
CONTENT
1 WHEN type=kotlin.Unit origin=null
1 WHEN type=kotlin.Unit origin=IF
2 GET_VAR 'value-parameter m: Int' type=kotlin.Int origin=null
3 GET_VAR 'number: Int' type=kotlin.Int origin=null
4 CONST Int type=kotlin.Int value=10
@@ -31,10 +31,10 @@ CONTENT
4 GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
5 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
OUTGOING -> BB 3
When exit: WHEN type=kotlin.Unit origin=null
When exit: WHEN type=kotlin.Unit origin=IF
BB 3
INCOMING <- BB 2
When exit: WHEN type=kotlin.Unit origin=null
When exit: WHEN type=kotlin.Unit origin=IF
CONTENT
1 SET_VAR 'number: Int' type=kotlin.Unit origin=DIVEQ
2 GET_VAR 'number: Int' type=kotlin.Int origin=null
+2 -2
View File
@@ -29,7 +29,7 @@ CONTENT
1 GET_VAR 'tmp0_iterator: IntIterator' type=kotlin.collections.IntIterator origin=null
2 CALL 'next(): Int' type=kotlin.Int origin=FOR_LOOP_NEXT
3 VAR FOR_LOOP_VARIABLE name:m type:kotlin.Int flags:val
4 WHEN type=kotlin.Unit origin=null
4 WHEN type=kotlin.Unit origin=IF
5 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
6 GET_VAR 'm: Int' type=kotlin.Int origin=null
7 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC
@@ -48,7 +48,7 @@ INCOMING <- BB 2
CALL 'greater(Int, Int): Boolean' type=kotlin.Boolean origin=GT
CONTENT
1 SET_VAR 'sum: Int' type=kotlin.Unit origin=PLUSEQ
2 WHEN type=kotlin.Unit origin=null
2 WHEN type=kotlin.Unit origin=IF
3 GET_VAR 'sum: Int' type=kotlin.Int origin=null
4 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
OUTGOING -> BB 5, 6