summary refs log tree commit diff stats
path: root/compiler/ast.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-25 16:50:54 +0200
committerGitHub <noreply@github.com>2016-08-25 16:50:54 +0200
commit10f445da89ecd6e07996479694e694ab23db0262 (patch)
tree02dbceb9c8434ca5481ffaed050ec70a36364ce6 /compiler/ast.nim
parent1e134aed49ea74fc6846ce875eca9c4516724439 (diff)
parent618e264b5812f1b215fab9672300f492275c4f38 (diff)
downloadNim-10f445da89ecd6e07996479694e694ab23db0262.tar.gz
Merge pull request #4592 from arnetheduck/compiler-cleanup
Compiler cleanup
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r--compiler/ast.nim26
1 files changed, 0 insertions, 26 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 277a21ba5..5ed458aff 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -726,9 +726,6 @@ type
     flags*: TLocFlags         # location's flags
     t*: PType                 # type of location
     r*: Rope                 # rope value of location (code generators)
-    heapRoot*: Rope          # keeps track of the enclosing heap object that
-                              # owns this location (required by GC algorithms
-                              # employing heap snapshots or sliding views)
 
   # ---------------- end of backend information ------------------------------
 
@@ -862,9 +859,6 @@ type
     key*, val*: RootRef
 
   TPairSeq* = seq[TPair]
-  TTable* = object   # the same as table[PObject] of PObject
-    counter*: int
-    data*: TPairSeq
 
   TIdPair* = object
     key*: PIdObj
@@ -1108,12 +1102,6 @@ proc copyIdTable*(dest: var TIdTable, src: TIdTable) =
   newSeq(dest.data, len(src.data))
   for i in countup(0, high(src.data)): dest.data[i] = src.data[i]
 
-proc copyTable*(dest: var TTable, src: TTable) =
-  dest.counter = src.counter
-  if isNil(src.data): return
-  setLen(dest.data, len(src.data))
-  for i in countup(0, high(src.data)): dest.data[i] = src.data[i]
-
 proc copyObjectSet*(dest: var TObjectSet, src: TObjectSet) =
   dest.counter = src.counter
   if isNil(src.data): return
@@ -1327,10 +1315,6 @@ proc initStrTable*(x: var TStrTable) =
 proc newStrTable*: TStrTable =
   initStrTable(result)
 
-proc initTable(x: var TTable) =
-  x.counter = 0
-  newSeq(x.data, StartSize)
-
 proc initIdTable*(x: var TIdTable) =
   x.counter = 0
   newSeq(x.data, StartSize)
@@ -1511,16 +1495,6 @@ proc hasSubnodeWith*(n: PNode, kind: TNodeKind): bool =
         return true
     result = false
 
-proc replaceSons(n: PNode, oldKind, newKind: TNodeKind) =
-  for i in countup(0, sonsLen(n) - 1):
-    if n.sons[i].kind == oldKind: n.sons[i].kind = newKind
-
-proc sonsNotNil(n: PNode): bool =
-  for i in countup(0, sonsLen(n) - 1):
-    if n.sons[i] == nil:
-      return false
-  result = true
-
 proc getInt*(a: PNode): BiggestInt =
   case a.kind
   of nkIntLit..nkUInt64Lit: result = a.intVal