diff options
author | Araq <rumpf_a@web.de> | 2015-03-21 15:18:32 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-03-21 20:38:27 +0100 |
commit | 5641be51c1eefc7887361c2ad986ca20d7135e7b (patch) | |
tree | 6c98433e48acca2bfdb21f1a5b2fe86f69358dd1 /lib | |
parent | 508e8bd686050f09b7b6ca720e5b1b037a6bac62 (diff) | |
download | Nim-5641be51c1eefc7887361c2ad986ca20d7135e7b.tar.gz |
codegen doesn't produce line tracing commands anymore; fixes #1344
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/system.nim b/lib/system.nim index 23c911a19..a57edb73a 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1557,9 +1557,9 @@ when not defined(nimrodVM) and hostOS != "standalone": ## process. This is only available when threads are enabled. when sizeof(int) <= 2: - type IntLikeForCount = int|int8|int16|char|bool|uint8 + type IntLikeForCount = int|int8|int16|char|bool|uint8|enum else: - type IntLikeForCount = int|int8|int16|int32|char|bool|uint8|uint16 + type IntLikeForCount = int|int8|int16|int32|char|bool|uint8|uint16|enum iterator countdown*[T](a, b: T, step = 1): T {.inline.} = ## Counts from ordinal value `a` down to `b` with the given @@ -2900,20 +2900,16 @@ proc `[]`*[Idx, T](a: array[Idx, T], x: Slice[Idx]): seq[T] = ## because the array might have negative bounds. var L = ord(x.b) - ord(x.a) + 1 newSeq(result, L) - var j = x.a for i in 0.. <L: - result[i] = a[j] - inc(j) + result[i] = a[Idx(ord(x.a) + i)] proc `[]=`*[Idx, T](a: var array[Idx, T], x: Slice[Idx], b: openArray[T]) = ## slice assignment for arrays. Negative indexes are **not** supported ## because the array might have negative bounds. var L = ord(x.b) - ord(x.a) + 1 if L == b.len: - var j = x.a for i in 0 .. <L: - a[j] = b[i] - inc(j) + a[Idx(ord(x.a) + i)] = b[i] else: sysFatal(RangeError, "different lengths for slice assignment") |