summary refs log tree commit diff stats
path: root/lib/system/repr.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-07-21 13:16:53 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-21 13:16:53 +0200
commitf485ebe1624656c0cf495baaebc5d45fdc9bdbeb (patch)
tree5c462e7836f027fc7371d6f589d3cb1b73b2bbed /lib/system/repr.nim
parent4389409e2657e4cec098180299b2d41b1a3a40f7 (diff)
downloadNim-f485ebe1624656c0cf495baaebc5d45fdc9bdbeb.tar.gz
--gc:destructors: next steps; WIP
Diffstat (limited to 'lib/system/repr.nim')
-rw-r--r--lib/system/repr.nim18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index 982b07467..45acae7f1 100644
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -25,24 +25,6 @@ proc reprPointer(x: pointer): string {.compilerproc.} =
     discard c_sprintf(buf, "%p", x)
     return $buf
 
-proc `$`(x: uint64): string =
-  if x == 0:
-    result = "0"
-  else:
-    result = newString(60)
-    var i = 0
-    var n = x
-    while n != 0:
-      let nn = n div 10'u64
-      result[i] = char(n - 10'u64 * nn + ord('0'))
-      inc i
-      n = nn
-    result.setLen i
-
-    let half = i div 2
-    # Reverse
-    for t in 0 .. half-1: swap(result[t], result[i-t-1])
-
 proc reprStrAux(result: var string, s: cstring; len: int) =
   if cast[pointer](s) == nil:
     add result, "nil"