summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-08-01 23:40:48 +0200
committerAraq <rumpf_a@web.de>2014-08-01 23:40:48 +0200
commit9673e4f2df941bfeeb3e1fe8e66d89fddea1145b (patch)
treeb7178daacba45beb51b3afb453fa256a0d6285d2 /lib/system.nim
parent821fe72ff55866737c5b1d9f356b8d142f8836c3 (diff)
downloadNim-9673e4f2df941bfeeb3e1fe8e66d89fddea1145b.tar.gz
progress on deepCopy
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 753205777..3e4d3fb9e 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2997,10 +2997,13 @@ proc locals*(): TObject {.magic: "Locals", noSideEffect.} =
   ##   # -> B is 1
   discard
 
-proc deepCopy*[T](x: T): T {.magic: "DeepCopy", noSideEffect.} =
-  ## performs a deep copy of `x`. This is also used by the code generator
-  ## for the implementation of ``spawn``.
-  discard
+when hostOS != "standalone" and not defined(NimrodVM) and not defined(JS):
+  proc deepCopy*[T](x: var T, y: T) {.noSideEffect, magic: "DeepCopy".} =
+    ## performs a deep copy of `x`. This is also used by the code generator
+    ## for the implementation of ``spawn``.
+    discard
+
+  include "system/deepcopy"
 
 {.pop.} #{.push warning[GcMem]: off.}