summary refs log tree commit diff stats
path: root/tools/heapdumprepl.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tools/heapdumprepl.nim')
-rw-r--r--tools/heapdumprepl.nim10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/heapdumprepl.nim b/tools/heapdumprepl.nim
index ffa153f5d..4f06cf111 100644
--- a/tools/heapdumprepl.nim
+++ b/tools/heapdumprepl.nim
@@ -1,5 +1,4 @@
-
-include prelude
+include std/prelude
 import intsets
 
 type
@@ -17,7 +16,6 @@ type
     roots: Table[int, NodeKind]
 
 proc add(father: Node; son: int) =
-  if father.kids.isNil: father.kids = @[]
   father.kids.add(son)
 
 proc renderNode(g: Graph; id: int) =
@@ -49,7 +47,7 @@ const Help = """
 quit          -- quits this REPL
 locals, l     -- output the list of local stack roots
 globals, g    -- output the list of global roots
-alias name addr -- give addr a name. start 'addr' with 'x' for hexidecimal
+alias name addr -- give addr a name. start 'addr' with 'x' for hexadecimal
                    notation
 print name|addr  -- print a node by name or address
 reachable,r  l|g|node  dest   -- outputs TRUE or FALSE depending on whether
@@ -141,8 +139,8 @@ proc importData(input: string): Graph =
     close(i)
   else:
     quit "error: cannot open " & input
-  shallowCopy(result.nodes, nodes)
-  shallowCopy(result.roots, roots)
+  result.nodes = move nodes
+  result.roots = move roots
 
 if paramCount() == 1:
   repl(importData(paramStr(1)))