Files
kotlin-fork/compiler/testData/ir/irCfg/loop/digitCount.txt
T
Dmitry Petrov 9137e68d4e Implement special desugaring for numeric comparisons in PSI2IR
This introduces the following IR built-in functions required for proper
implementation of the number comparisons:

- ieee754Equals(T, T): Boolean,
    for each T in {Float?, Double?}

- less(T, T): Boolean
  lessOrEqual(T, T): Boolean
  greater(T, T): Boolean
  greaterOrEqual(T, T): Boolean
    for each T in {Int, Long, Float, Double}
2018-02-07 14:30:59 +03:00

69 lines
2.5 KiB
Plaintext
Vendored

// FILE: /digitCount.kt
// FUN: digitCountInNumber
BB 0
CONTENT
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 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
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
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
5 CALL 'rem(Int): Int' type=kotlin.Int origin=PERC
OUTGOING -> BB 2
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
BB 2
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 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
OUTGOING -> BB 3
When exit: WHEN type=kotlin.Unit origin=null
BB 3
INCOMING <- BB 2
When exit: WHEN type=kotlin.Unit origin=null
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
OUTGOING -> BB 4, 5
CALL 'greater(Int, Int): Boolean' type=kotlin.Boolean origin=GT
BB 4
INCOMING <- BB 3
CALL 'greater(Int, Int): Boolean' type=kotlin.Boolean origin=GT
CONTENT
OUTGOING -> BB 1
Do..while entry: DO_WHILE label=null origin=DO_WHILE_LOOP
BB 5
INCOMING <- BB 3
CALL 'greater(Int, Int): Boolean' type=kotlin.Boolean origin=GT
CONTENT
OUTGOING -> BB 6
Do..while exit: DO_WHILE label=null origin=DO_WHILE_LOOP
BB 6
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'
OUTGOING -> NONE
Function exit: FUN name:digitCountInNumber visibility:public modality:FINAL <> (n:kotlin.Int, m:kotlin.Int) returnType:Int flags:
// END FUN: digitCountInNumber
// END FILE: /digitCount.kt