92 lines
3.4 KiB
Plaintext
Vendored
92 lines
3.4 KiB
Plaintext
Vendored
// FILE: /isPerfect.kt
|
|
// 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'
|
|
5 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
|
|
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 IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.IntIterator
|
|
11 WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
OUTGOING -> BB 1
|
|
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
BB 1
|
|
INCOMING <- BB 0, 3, 6
|
|
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
CONTENT
|
|
1 GET_VAR 'tmp0_iterator: IntIterator' type=kotlin.collections.IntIterator origin=null
|
|
OUTGOING -> BB 2, 7
|
|
CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
|
BB 2
|
|
INCOMING <- BB 1
|
|
CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
|
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 val m: kotlin.Int
|
|
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 'mod(Int): Int' type=kotlin.Int origin=PERC
|
|
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
|
|
BB 3
|
|
INCOMING <- BB 2
|
|
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
|
CONTENT
|
|
1 CONTINUE label=null loop.label=null
|
|
OUTGOING -> BB 1
|
|
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
BB 4
|
|
INCOMING <- BB 2
|
|
CALL 'GT0(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
|
|
3 GET_VAR 'sum: Int' type=kotlin.Int origin=null
|
|
4 GET_VAR 'value-parameter n: Int' type=kotlin.Int origin=null
|
|
5 CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT
|
|
OUTGOING -> BB 5, 6
|
|
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
|
BB 5
|
|
INCOMING <- BB 4
|
|
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
|
CONTENT
|
|
1 BREAK label=null loop.label=null
|
|
OUTGOING -> BB 8
|
|
While exit: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
BB 6
|
|
INCOMING <- BB 4
|
|
CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
|
CONTENT
|
|
OUTGOING -> BB 1
|
|
While entry: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
BB 7
|
|
INCOMING <- BB 1
|
|
CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
|
CONTENT
|
|
OUTGOING -> BB 8
|
|
While exit: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
BB 8
|
|
INCOMING <- BB 5, 7
|
|
While exit: WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
|
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'
|
|
OUTGOING -> NONE
|
|
Function exit: FUN public fun isPerfect(n: kotlin.Int): kotlin.Boolean
|
|
|
|
// END FUN: isPerfect
|
|
|
|
// END FILE: /isPerfect.kt
|
|
|