summary refs log tree commit diff stats
path: root/compiler/dfa.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-05-29 12:08:17 +0200
committerGitHub <noreply@github.com>2020-05-29 12:08:17 +0200
commite31ac81899767e4cebb706ed473dae7ff6f0afd7 (patch)
tree07dc41f3d9b45216bafd5fc6ab18bb629f4dd050 /compiler/dfa.nim
parent4c08e64e9868dabca4a1a82979b74bda5c7d0329 (diff)
downloadNim-e31ac81899767e4cebb706ed473dae7ff6f0afd7.tar.gz
more checking for --gc:arc, no need for valgrind (#14467)
* sigmatch: removed dead code
Diffstat (limited to 'compiler/dfa.nim')
-rw-r--r--compiler/dfa.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/dfa.nim b/compiler/dfa.nim
index 67a9e26d8..a0ec31ac6 100644
--- a/compiler/dfa.nim
+++ b/compiler/dfa.nim
@@ -809,4 +809,7 @@ proc constructCfg*(s: PSym; body: PNode): ControlFlowGraph =
   withBlock(s):
     gen(c, body)
     genImplicitReturn(c)
-  shallowCopy(result, c.code)
+  when defined(gcArc) or defined(gcOrc):
+    result = c.code # will move
+  else:
+    shallowCopy(result, c.code)