Fix to int to biggest int (#12066)
* fix to(Biggest)Int * kill toFloat magics as well
This commit is contained in:
parent
eff0837ff4
commit
d564130a3b
10 changed files with 43 additions and 64 deletions
|
|
@ -196,10 +196,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode; g: ModuleGraph): PNode =
|
|||
else:
|
||||
result = newIntNodeT(toInt128(sonsLen(a)), n, g)
|
||||
of mUnaryPlusI, mUnaryPlusF64: result = a # throw `+` away
|
||||
of mToFloat, mToBiggestFloat:
|
||||
result = newFloatNodeT(toFloat64(getInt(a)), n, g)
|
||||
# XXX: Hides overflow/underflow
|
||||
of mToInt, mToBiggestInt: result = newIntNodeT(system.toInt(getFloat(a)), n, g)
|
||||
of mAbsF64: result = newFloatNodeT(abs(getFloat(a)), n, g)
|
||||
of mAbsI: result = foldAbs(getInt(a), n, g)
|
||||
of mUnaryLt: result = foldSub(getOrdValue(a), One, n, g)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue