9137e68d4e
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}
39 lines
2.4 KiB
Plaintext
Vendored
39 lines
2.4 KiB
Plaintext
Vendored
FILE fqName:<root> fileName:/coercionInLoop.kt
|
|
FUN name:box visibility:public modality:FINAL <> () returnType:String flags:
|
|
BLOCK_BODY
|
|
VAR name:a type:kotlin.DoubleArray flags:val
|
|
CALL 'constructor DoubleArray(Int)' type=kotlin.DoubleArray origin=null
|
|
size: CONST Int type=kotlin.Int value=5
|
|
VAR name:x type:kotlin.collections.DoubleIterator flags:val
|
|
CALL 'iterator(): DoubleIterator' type=kotlin.collections.DoubleIterator origin=null
|
|
$this: GET_VAR 'a: DoubleArray' type=kotlin.DoubleArray origin=null
|
|
VAR name:i type:kotlin.Int flags:var
|
|
CONST Int type=kotlin.Int value=0
|
|
WHILE label=null origin=WHILE_LOOP
|
|
condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=null
|
|
$this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null
|
|
body: BLOCK type=kotlin.Unit origin=null
|
|
WHEN type=kotlin.Unit origin=null
|
|
BRANCH
|
|
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
|
arg0: CALL 'ieee754equals(Double?, Double?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
|
arg0: CALL 'get(Int): Double' type=kotlin.Double origin=GET_ARRAY_ELEMENT
|
|
$this: GET_VAR 'a: DoubleArray' type=kotlin.DoubleArray origin=null
|
|
index: GET_VAR 'i: Int' type=kotlin.Int origin=null
|
|
arg1: CALL 'next(): Double' type=kotlin.Double origin=null
|
|
$this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null
|
|
then: RETURN type=kotlin.Nothing from='box(): String'
|
|
STRING_CONCATENATION type=kotlin.String
|
|
CONST String type=kotlin.String value=Fail
|
|
GET_VAR 'i: Int' type=kotlin.Int origin=null
|
|
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
|
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
|
VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Int flags:val
|
|
GET_VAR 'i: Int' type=kotlin.Int origin=POSTFIX_INCR
|
|
SET_VAR 'i: Int' type=kotlin.Unit origin=POSTFIX_INCR
|
|
CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
|
|
$this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
|
|
GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
|
|
RETURN type=kotlin.Nothing from='box(): String'
|
|
CONST String type=kotlin.String value=OK
|