// FILE: /digitCount.kt // FUN: digitCountInNumber BB 0 CONTENT 1 FUN name:digitCountInNumber visibility:public modality:FINAL <> (n:kotlin.Int, m:kotlin.Int) returnType:kotlin.Int 2 CONST Int type=kotlin.Int value=0 3 VAR name:count type:kotlin.Int [var] 4 GET_VAR 'n: kotlin.Int declared in .digitCountInNumber' type=kotlin.Int origin=null 5 VAR name:number type:kotlin.Int [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=IF 2 GET_VAR 'm: kotlin.Int declared in .digitCountInNumber' type=kotlin.Int origin=null 3 GET_VAR 'var number: kotlin.Int [var] declared in .digitCountInNumber' type=kotlin.Int origin=null 4 CONST Int type=kotlin.Int value=10 5 CALL 'public final fun rem (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PERC OUTGOING -> BB 2 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ BB 2 INCOMING <- BB 1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ CONTENT 1 GET_VAR 'var count: kotlin.Int [var] declared in .digitCountInNumber' type=kotlin.Int origin=POSTFIX_INCR 2 VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Int [val] 3 SET_VAR 'var count: kotlin.Int [var] declared in .digitCountInNumber' type=kotlin.Unit origin=POSTFIX_INCR 4 GET_VAR 'val tmp0: kotlin.Int [val] declared in .digitCountInNumber' 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=IF BB 3 INCOMING <- BB 2 When exit: WHEN type=kotlin.Unit origin=IF CONTENT 1 SET_VAR 'var number: kotlin.Int [var] declared in .digitCountInNumber' type=kotlin.Unit origin=DIVEQ 2 GET_VAR 'var number: kotlin.Int [var] declared in .digitCountInNumber' type=kotlin.Int origin=null 3 CONST Int type=kotlin.Int value=0 OUTGOING -> BB 4, 5 CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT BB 4 INCOMING <- BB 3 CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' 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 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' 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 'var count: kotlin.Int [var] declared in .digitCountInNumber' type=kotlin.Int origin=null 2 RETURN type=kotlin.Nothing from='public final fun digitCountInNumber (n: kotlin.Int, m: kotlin.Int): kotlin.Int declared in ' OUTGOING -> NONE Function exit: FUN name:digitCountInNumber visibility:public modality:FINAL <> (n:kotlin.Int, m:kotlin.Int) returnType:kotlin.Int // END FUN: digitCountInNumber // END FILE: /digitCount.kt