diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-08-08 20:21:05 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-08-08 20:21:05 +0200 |
commit | 94a9688556ca3b26a28d41319eaa14ae55b9d9d7 (patch) | |
tree | 36525ba9ea929f39139bf51aa876586857868143 | |
parent | 1f34117c06a594ae89fff75129e9068941145e7e (diff) | |
download | Nim-94a9688556ca3b26a28d41319eaa14ae55b9d9d7.tar.gz |
disable TR macro for increased compile times; define nimTrMacros to re-enable
-rw-r--r-- | lib/system.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim index 23f9227c3..82980d9da 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1744,7 +1744,7 @@ proc swap*[T](a, b: var T) {.magic: "Swap", noSideEffect.} ## swaps the values `a` and `b`. This is often more efficient than ## ``tmp = a; a = b; b = tmp``. Particularly useful for sorting algorithms. -when not defined(js) and not defined(booting): +when not defined(js) and not defined(booting) and defined(nimTrMacros): template swapRefsInArray*{swap(arr[a], arr[b])}(arr: openarray[ref], a, b: int) = # Optimize swapping of array elements if they are refs. Default swap # implementation will cause unsureAsgnRef to be emitted which causes |