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
+4 -4
View File
@@ -3,7 +3,7 @@
BB 0
CONTENT
1 FUN name:max visibility:public modality:FINAL <> (x:kotlin.Int, y:kotlin.Int) returnType:kotlin.Int flags:
2 WHEN type=kotlin.Int origin=null
2 WHEN type=kotlin.Int origin=IF
3 GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
4 GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=null
OUTGOING -> BB 1, 2
@@ -20,17 +20,17 @@ INCOMING <- BB 0
CONTENT
1 GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
OUTGOING -> BB 4
When exit: WHEN type=kotlin.Int origin=null
When exit: WHEN type=kotlin.Int origin=IF
BB 3
INCOMING <- BB 1
CONST Boolean type=kotlin.Boolean value=true
CONTENT
1 GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=null
OUTGOING -> BB 4
When exit: WHEN type=kotlin.Int origin=null
When exit: WHEN type=kotlin.Int origin=IF
BB 4
INCOMING <- BB 2, 3
When exit: WHEN type=kotlin.Int origin=null
When exit: WHEN type=kotlin.Int origin=IF
CONTENT
1 RETURN type=kotlin.Nothing from='max(Int, Int): Int'
OUTGOING -> NONE
+12 -12
View File
@@ -3,7 +3,7 @@
BB 0
CONTENT
1 FUN name:minBiRoot visibility:public modality:FINAL <> (a:kotlin.Double, b:kotlin.Double, c:kotlin.Double) returnType:kotlin.Double flags:
2 WHEN type=kotlin.Unit origin=null
2 WHEN type=kotlin.Unit origin=IF
3 GET_VAR 'value-parameter a: Double' type=kotlin.Double origin=null
4 CONST Double type=kotlin.Double value=0.0
OUTGOING -> BB 1, 6
@@ -12,7 +12,7 @@ BB 1
INCOMING <- BB 0
CALL 'ieee754equals(Double?, Double?): Boolean' type=kotlin.Boolean origin=EQEQ
CONTENT
1 WHEN type=kotlin.Unit origin=null
1 WHEN type=kotlin.Unit origin=IF
2 GET_VAR 'value-parameter b: Double' type=kotlin.Double origin=null
3 CONST Double type=kotlin.Double value=0.0
OUTGOING -> BB 2, 3
@@ -34,7 +34,7 @@ CONTENT
3 GET_VAR 'value-parameter b: Double' type=kotlin.Double origin=null
4 CALL 'div(Double): Double' type=kotlin.Double origin=DIV
5 VAR name:bc type:kotlin.Double flags:val
6 WHEN type=kotlin.Unit origin=null
6 WHEN type=kotlin.Unit origin=IF
7 GET_VAR 'bc: Double' type=kotlin.Double origin=null
8 CONST Double type=kotlin.Double value=0.0
OUTGOING -> BB 4, 5
@@ -70,7 +70,7 @@ CONTENT
8 CALL 'times(Double): Double' type=kotlin.Double origin=MUL
9 CALL 'minus(Double): Double' type=kotlin.Double origin=MINUS
10 VAR name:d type:kotlin.Double flags:val
11 WHEN type=kotlin.Unit origin=null
11 WHEN type=kotlin.Unit origin=IF
12 GET_VAR 'd: Double' type=kotlin.Double origin=null
13 CONST Double type=kotlin.Double value=0.0
OUTGOING -> BB 7, 8
@@ -105,7 +105,7 @@ CONTENT
16 CALL 'times(Double): Double' type=kotlin.Double origin=MUL
17 CALL 'div(Double): Double' type=kotlin.Double origin=DIV
18 VAR name:y2 type:kotlin.Double flags:val
19 WHEN type=kotlin.Double origin=null
19 WHEN type=kotlin.Double origin=IF
20 GET_VAR 'y1: Double' type=kotlin.Double origin=null
21 GET_VAR 'y2: Double' type=kotlin.Double origin=null
OUTGOING -> BB 9, 10
@@ -122,20 +122,20 @@ INCOMING <- BB 8
CONTENT
1 GET_VAR 'y1: Double' type=kotlin.Double origin=null
OUTGOING -> BB 12
When exit: WHEN type=kotlin.Double origin=null
When exit: WHEN type=kotlin.Double origin=IF
BB 11
INCOMING <- BB 9
CONST Boolean type=kotlin.Boolean value=true
CONTENT
1 GET_VAR 'y2: Double' type=kotlin.Double origin=null
OUTGOING -> BB 12
When exit: WHEN type=kotlin.Double origin=null
When exit: WHEN type=kotlin.Double origin=IF
BB 12
INCOMING <- BB 10, 11
When exit: WHEN type=kotlin.Double origin=null
When exit: WHEN type=kotlin.Double origin=IF
CONTENT
1 VAR name:y3 type:kotlin.Double flags:val
2 WHEN type=kotlin.Double origin=null
2 WHEN type=kotlin.Double origin=IF
3 GET_VAR 'y3: Double' type=kotlin.Double origin=null
4 CONST Double type=kotlin.Double value=0.0
OUTGOING -> BB 13, 14
@@ -152,7 +152,7 @@ INCOMING <- BB 12
CONTENT
1 CONST Double type=kotlin.Double value=4.0
OUTGOING -> BB 16
When exit: WHEN type=kotlin.Double origin=null
When exit: WHEN type=kotlin.Double origin=IF
BB 15
INCOMING <- BB 13
CONST Boolean type=kotlin.Boolean value=true
@@ -160,10 +160,10 @@ CONTENT
1 GET_VAR 'y3: Double' type=kotlin.Double origin=null
2 CALL 'unaryMinus(): Double' type=kotlin.Double origin=UMINUS
OUTGOING -> BB 16
When exit: WHEN type=kotlin.Double origin=null
When exit: WHEN type=kotlin.Double origin=IF
BB 16
INCOMING <- BB 14, 15
When exit: WHEN type=kotlin.Double origin=null
When exit: WHEN type=kotlin.Double origin=IF
CONTENT
1 RETURN type=kotlin.Nothing from='minBiRoot(Double, Double, Double): Double'
OUTGOING -> NONE