Update testData to new format
This commit is contained in:
+9
-9
@@ -2,11 +2,11 @@
|
||||
// FUN: digitCountInNumber
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun digitCountInNumber(n: kotlin.Int, m: kotlin.Int): kotlin.Int
|
||||
2 CONST Int type=kotlin.Int value='0'
|
||||
3 VAR var count: kotlin.Int
|
||||
1 FUN name:digitCountInNumber visibility:public modality:FINAL <> (n:kotlin.Int, m:kotlin.Int) returnType:Int flags:
|
||||
2 CONST Int type=kotlin.Int value=0
|
||||
3 VAR name:count type:kotlin.Int flags:var
|
||||
4 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
|
||||
5 VAR var number: kotlin.Int
|
||||
5 VAR name:number type:kotlin.Int flags:var
|
||||
6 DO_WHILE label=null origin=DO_WHILE_LOOP
|
||||
OUTGOING -> BB 1
|
||||
Do..while entry: DO_WHILE label=null origin=DO_WHILE_LOOP
|
||||
@@ -17,7 +17,7 @@ CONTENT
|
||||
1 WHEN type=kotlin.Unit origin=null
|
||||
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'
|
||||
4 CONST Int type=kotlin.Int value=10
|
||||
5 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC
|
||||
OUTGOING -> BB 2
|
||||
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
@@ -26,7 +26,7 @@ INCOMING <- BB 1
|
||||
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
CONTENT
|
||||
1 GET_VAR 'count: Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
2 VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
|
||||
2 VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Int flags:val
|
||||
3 SET_VAR 'count: Int' type=kotlin.Unit origin=POSTFIX_INCR
|
||||
4 GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
|
||||
5 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
@@ -38,7 +38,7 @@ INCOMING <- BB 2
|
||||
CONTENT
|
||||
1 SET_VAR 'number: Int' type=kotlin.Unit origin=DIVEQ
|
||||
2 GET_VAR 'number: Int' type=kotlin.Int origin=null
|
||||
3 CONST Int type=kotlin.Int value='0'
|
||||
3 CONST Int type=kotlin.Int value=0
|
||||
4 CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT
|
||||
OUTGOING -> BB 4, 5
|
||||
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
||||
@@ -59,9 +59,9 @@ INCOMING <- BB 5
|
||||
Do..while exit: DO_WHILE label=null origin=DO_WHILE_LOOP
|
||||
CONTENT
|
||||
1 GET_VAR 'count: Int' type=kotlin.Int origin=null
|
||||
2 RETURN type=kotlin.Nothing from='digitCountInNumber(Int, Int): Int'
|
||||
2 RETURN type=kotlin.Nothing from=digitCountInNumber(Int, Int): Int'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun digitCountInNumber(n: kotlin.Int, m: kotlin.Int): kotlin.Int
|
||||
Function exit: FUN name:digitCountInNumber visibility:public modality:FINAL <> (n:kotlin.Int, m:kotlin.Int) returnType:Int flags:
|
||||
|
||||
// END FUN: digitCountInNumber
|
||||
|
||||
|
||||
+8
-8
@@ -2,14 +2,14 @@
|
||||
// FUN: factorial
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun factorial(i: kotlin.Int): kotlin.Int
|
||||
2 CONST Int type=kotlin.Int value='1'
|
||||
3 VAR var result: kotlin.Int
|
||||
4 CONST Int type=kotlin.Int value='2'
|
||||
1 FUN name:factorial visibility:public modality:FINAL <> (i:kotlin.Int) returnType:Int flags:
|
||||
2 CONST Int type=kotlin.Int value=1
|
||||
3 VAR name:result type:kotlin.Int flags:var
|
||||
4 CONST Int type=kotlin.Int value=2
|
||||
5 GET_VAR 'value-parameter i: Int' type=kotlin.Int origin=null
|
||||
6 CALL 'rangeTo(Int): IntRange' type=kotlin.ranges.IntRange origin=RANGE
|
||||
7 CALL 'iterator(): IntIterator' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
8 VAR FOR_LOOP_ITERATOR val tmp0_iterator: kotlin.collections.IntIterator
|
||||
8 VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.IntIterator flags:val
|
||||
9 WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
OUTGOING -> BB 1
|
||||
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
@@ -26,7 +26,7 @@ INCOMING <- BB 1
|
||||
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 val j: kotlin.Int
|
||||
3 VAR FOR_LOOP_VARIABLE name:j type:kotlin.Int flags:val
|
||||
4 SET_VAR 'result: Int' type=kotlin.Unit origin=MULTEQ
|
||||
OUTGOING -> BB 1
|
||||
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
@@ -41,9 +41,9 @@ INCOMING <- BB 3
|
||||
While exit: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
CONTENT
|
||||
1 GET_VAR 'result: Int' type=kotlin.Int origin=null
|
||||
2 RETURN type=kotlin.Nothing from='factorial(Int): Int'
|
||||
2 RETURN type=kotlin.Nothing from=factorial(Int): Int'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun factorial(i: kotlin.Int): kotlin.Int
|
||||
Function exit: FUN name:factorial visibility:public modality:FINAL <> (i:kotlin.Int) returnType:Int flags:
|
||||
|
||||
// END FUN: factorial
|
||||
|
||||
|
||||
+10
-10
@@ -2,16 +2,16 @@
|
||||
// FUN: isPerfect
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN public fun isPerfect(n: kotlin.Int): kotlin.Boolean
|
||||
2 CONST Int type=kotlin.Int value='1'
|
||||
3 VAR var sum: kotlin.Int
|
||||
4 CONST Int type=kotlin.Int value='2'
|
||||
1 FUN name:isPerfect visibility:public modality:FINAL <> (n:kotlin.Int) returnType:Boolean flags:
|
||||
2 CONST Int type=kotlin.Int value=1
|
||||
3 VAR name:sum type:kotlin.Int flags:var
|
||||
4 CONST Int type=kotlin.Int value=2
|
||||
5 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
|
||||
6 CONST Int type=kotlin.Int value='2'
|
||||
6 CONST Int type=kotlin.Int value=2
|
||||
7 CALL 'div(Int): Int' type=kotlin.Int origin=DIV
|
||||
8 CALL 'rangeTo(Int): IntRange' type=kotlin.ranges.IntRange origin=RANGE
|
||||
9 CALL 'iterator(): IntIterator' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
10 VAR FOR_LOOP_ITERATOR val tmp0_iterator: kotlin.collections.IntIterator
|
||||
10 VAR FOR_LOOP_ITERATOR name:tmp0_iterator type:kotlin.collections.IntIterator flags:val
|
||||
11 WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
OUTGOING -> BB 1
|
||||
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
@@ -28,12 +28,12 @@ INCOMING <- BB 1
|
||||
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 val m: kotlin.Int
|
||||
3 VAR FOR_LOOP_VARIABLE name:m type:kotlin.Int flags:val
|
||||
4 WHEN type=kotlin.Unit origin=null
|
||||
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
|
||||
8 CONST Int type=kotlin.Int value='0'
|
||||
8 CONST Int type=kotlin.Int value=0
|
||||
9 CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT
|
||||
OUTGOING -> BB 3, 4
|
||||
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
||||
@@ -81,9 +81,9 @@ CONTENT
|
||||
1 GET_VAR 'sum: Int' type=kotlin.Int origin=null
|
||||
2 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
|
||||
3 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
4 RETURN type=kotlin.Nothing from='isPerfect(Int): Boolean'
|
||||
4 RETURN type=kotlin.Nothing from=isPerfect(Int): Boolean'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN public fun isPerfect(n: kotlin.Int): kotlin.Boolean
|
||||
Function exit: FUN name:isPerfect visibility:public modality:FINAL <> (n:kotlin.Int) returnType:Boolean flags:
|
||||
|
||||
// END FUN: isPerfect
|
||||
|
||||
|
||||
Reference in New Issue
Block a user