summary refs log tree commit diff stats
path: root/lib/system/arithmetics.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/arithmetics.nim')
-rw-r--r--lib/system/arithmetics.nim106
1 files changed, 1 insertions, 105 deletions
diff --git a/lib/system/arithmetics.nim b/lib/system/arithmetics.nim
index d05aaaa5b..e229a0f4b 100644
--- a/lib/system/arithmetics.nim
+++ b/lib/system/arithmetics.nim
@@ -93,7 +93,7 @@ proc `*`*(x, y: int16): int16 {.magic: "MulI", noSideEffect.}
 proc `*`*(x, y: int32): int32 {.magic: "MulI", noSideEffect.}
 proc `*`*(x, y: int64): int64 {.magic: "MulI", noSideEffect.}
 
-proc `div`*(x, y: int): int {.magic: "DivI", noSideEffect.} = 
+proc `div`*(x, y: int): int {.magic: "DivI", noSideEffect.} =
   ## Computes the integer division.
   ##
   ## This is roughly the same as `math.trunc(x/y).int`.
@@ -403,107 +403,3 @@ proc `%%`*(x, y: int8): int8 {.inline.}   = cast[int8](cast[uint8](x) mod cast[u
 proc `%%`*(x, y: int16): int16 {.inline.} = cast[int16](cast[uint16](x) mod cast[uint16](y))
 proc `%%`*(x, y: int32): int32 {.inline.} = cast[int32](cast[uint32](x) mod cast[uint32](y))
 proc `%%`*(x, y: int64): int64 {.inline.} = cast[int64](cast[uint64](x) mod cast[uint64](y))
-
-when not defined(nimPreviewSlimSystem):
-  when defined(nimNoZeroExtendMagic):
-    proc ze*(x: int8): int {.deprecated.} =
-      ## zero extends a smaller integer type to `int`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int](uint(cast[uint8](x)))
-
-    proc ze*(x: int16): int {.deprecated.} =
-      ## zero extends a smaller integer type to `int`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int](uint(cast[uint16](x)))
-
-    proc ze64*(x: int8): int64 {.deprecated.} =
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int64](uint64(cast[uint8](x)))
-
-    proc ze64*(x: int16): int64 {.deprecated.} =
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int64](uint64(cast[uint16](x)))
-
-    proc ze64*(x: int32): int64 {.deprecated.} =
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int64](uint64(cast[uint32](x)))
-
-    proc ze64*(x: int): int64 {.deprecated.} =
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned. Does nothing if the size of an `int` is the same as `int64`.
-      ## (This is the case on 64 bit processors.)
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int64](uint64(cast[uint](x)))
-
-    proc toU8*(x: int): int8 {.deprecated.} =
-      ## treats `x` as unsigned and converts it to a byte by taking the last 8 bits
-      ## from `x`.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int8](x)
-
-    proc toU16*(x: int): int16 {.deprecated.} =
-      ## treats `x` as unsigned and converts it to an `int16` by taking the last
-      ## 16 bits from `x`.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int16](x)
-
-    proc toU32*(x: int64): int32 {.deprecated.} =
-      ## treats `x` as unsigned and converts it to an `int32` by taking the
-      ## last 32 bits from `x`.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-      cast[int32](x)
-
-  elif not defined(js):
-    proc ze*(x: int8): int {.magic: "Ze8ToI", noSideEffect, deprecated.}
-      ## zero extends a smaller integer type to `int`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc ze*(x: int16): int {.magic: "Ze16ToI", noSideEffect, deprecated.}
-      ## zero extends a smaller integer type to `int`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc ze64*(x: int8): int64 {.magic: "Ze8ToI64", noSideEffect, deprecated.}
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc ze64*(x: int16): int64 {.magic: "Ze16ToI64", noSideEffect, deprecated.}
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc ze64*(x: int32): int64 {.magic: "Ze32ToI64", noSideEffect, deprecated.}
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc ze64*(x: int): int64 {.magic: "ZeIToI64", noSideEffect, deprecated.}
-      ## zero extends a smaller integer type to `int64`. This treats `x` as
-      ## unsigned. Does nothing if the size of an `int` is the same as `int64`.
-      ## (This is the case on 64 bit processors.)
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc toU8*(x: int): int8 {.magic: "ToU8", noSideEffect, deprecated.}
-      ## treats `x` as unsigned and converts it to a byte by taking the last 8 bits
-      ## from `x`.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc toU16*(x: int): int16 {.magic: "ToU16", noSideEffect, deprecated.}
-      ## treats `x` as unsigned and converts it to an `int16` by taking the last
-      ## 16 bits from `x`.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.
-
-    proc toU32*(x: int64): int32 {.magic: "ToU32", noSideEffect, deprecated.}
-      ## treats `x` as unsigned and converts it to an `int32` by taking the
-      ## last 32 bits from `x`.
-      ## **Deprecated since version 0.19.9**: Use unsigned integers instead.