summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-07-09 15:15:49 +0200
committerGitHub <noreply@github.com>2021-07-09 15:15:49 +0200
commit4ec2f74246158759735149e3dd087f373fd787b2 (patch)
tree1b285703907d2fd192b57847af12f8b8f337ebad /lib
parentae7e7756fea146126ffc5200b2e66bfe2dab4cd4 (diff)
downloadNim-4ec2f74246158759735149e3dd087f373fd787b2.tar.gz
ORC: support for custom =trace procs (#18459)
* ORC: support custom =trace procs (WIP)
* Update tests/arc/tcustomtrace.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

* =trace is now documented and seems to work
* make test green

Co-authored-by: Clyybber <darkmine956@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 090ab309e..8aa9bd718 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -488,6 +488,11 @@ proc `=sink`*[T](x: var T; y: T) {.inline, magic: "Asgn".} =
   ## Generic `sink`:idx: implementation that can be overridden.
   shallowCopy(x, y)
 
+when defined(nimHasTrace):
+  proc `=trace`*[T](x: var T; env: pointer) {.inline, magic: "Trace".} =
+    ## Generic `trace`:idx: implementation that can be overridden.
+    discard
+
 type
   HSlice*[T, U] = object   ## "Heterogeneous" slice type.
     a*: T                  ## The lower bound (inclusive).