summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorJeff Ciesielski <jeffciesielski@gmail.com>2017-01-26 01:05:03 -0500
committerAndreas Rumpf <rumpf_a@web.de>2017-01-26 07:05:03 +0100
commit7f30d04d6a79821fe00a3add09878f73b83f78e4 (patch)
tree3eaa6482c0c5e5ee22f73eb4bb9cd940b0195bc2 /lib/system
parent536015ee7b2ad11df17c5eafa80ba0fce3c80bfd (diff)
downloadNim-7f30d04d6a79821fe00a3add09878f73b83f78e4.tar.gz
Fix compilation for 16 bit targets (#5286)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/assign.nim4
-rw-r--r--lib/system/deepcopy.nim2
-rw-r--r--lib/system/hti.nim2
-rw-r--r--lib/system/repr.nim2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/assign.nim b/lib/system/assign.nim
index 231a20d86..61c33e51b 100644
--- a/lib/system/assign.nim
+++ b/lib/system/assign.nim
@@ -211,14 +211,14 @@ proc genericReset(dest: pointer, mt: PNimType) =
     zeroMem(dest, mt.size) # set raw bits to zero
 
 proc selectBranch(discVal, L: int,
-                  a: ptr array[0..0x7fff, ptr TNimNode]): ptr TNimNode =
+                  a: ptr array[0x7fff, ptr TNimNode]): ptr TNimNode =
   result = a[L] # a[L] contains the ``else`` part (but may be nil)
   if discVal <% L:
     var x = a[discVal]
     if x != nil: result = x
 
 proc FieldDiscriminantCheck(oldDiscVal, newDiscVal: int,
-                            a: ptr array[0..0x7fff, ptr TNimNode],
+                            a: ptr array[0x7fff, ptr TNimNode],
                             L: int) {.compilerProc.} =
   var oldBranch = selectBranch(oldDiscVal, L, a)
   var newBranch = selectBranch(newDiscVal, L, a)
diff --git a/lib/system/deepcopy.nim b/lib/system/deepcopy.nim
index c137b3cf6..e12f08842 100644
--- a/lib/system/deepcopy.nim
+++ b/lib/system/deepcopy.nim
@@ -10,7 +10,7 @@
 type
   PtrTable = ptr object
     counter, max: int
-    data: array[0..0xff_ffff, (pointer, pointer)]
+    data: array[0xff_ffff, (pointer, pointer)]
 
 template hashPtr(key: pointer): int = cast[int](key) shr 8
 template allocPtrTable: untyped =
diff --git a/lib/system/hti.nim b/lib/system/hti.nim
index 6ac976cb4..69f4f9508 100644
--- a/lib/system/hti.nim
+++ b/lib/system/hti.nim
@@ -70,7 +70,7 @@ type
     typ: ptr TNimType
     name: cstring
     len: int
-    sons: ptr array[0..0x7fff, ptr TNimNode]
+    sons: ptr array[0x7fff, ptr TNimNode]
 
   TNimTypeFlag = enum
     ntfNoRefs = 0,     # type contains no tyRef, tySequence, tyString
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index b067d7a3d..db7fdcbca 100644
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -89,7 +89,7 @@ proc reprEnum(e: int, typ: PNimType): string {.compilerRtl.} =
   result = $e & " (invalid data!)"
 
 type
-  PByteArray = ptr array[0.. 0xffff, int8]
+  PByteArray = ptr array[0xffff, int8]
 
 proc addSetElem(result: var string, elem: int, typ: PNimType) {.benign.} =
   case typ.kind