diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-10-12 11:32:29 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-10-12 11:32:29 +0200 |
commit | ec253ada72a50f5fdca5c86fdf01b7099b1803aa (patch) | |
tree | dc1b5572fed974a57b15bc0736e3cdd33faf7193 /compiler/ast.nim | |
parent | 078e78d2087777ad14be152a5d2b7e72a1884a31 (diff) | |
download | Nim-ec253ada72a50f5fdca5c86fdf01b7099b1803aa.tar.gz |
initial version of the new untested destructor pass
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r-- | compiler/ast.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 97ff4b593..a6f774790 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -871,7 +871,8 @@ type # mean that there is no destructor. # see instantiateDestructor in semdestruct.nim deepCopy*: PSym # overriden 'deepCopy' operation - assignment*: PSym # overriden '=' operator + assignment*: PSym # overriden '=' operation + sink*: PSym # overriden '=sink' operation methods*: seq[(int,PSym)] # attached methods size*: BiggestInt # the size of the type in bytes # -1 means that the size is unkwown @@ -1047,6 +1048,8 @@ proc newNode*(kind: TNodeKind): PNode = proc newTree*(kind: TNodeKind; children: varargs[PNode]): PNode = result = newNode(kind) + if children.len > 0: + result.info = children[0].info result.sons = @children proc newIntNode*(kind: TNodeKind, intVal: BiggestInt): PNode = @@ -1290,6 +1293,7 @@ proc assignType*(dest, src: PType) = dest.align = src.align dest.destructor = src.destructor dest.deepCopy = src.deepCopy + dest.sink = src.sink dest.assignment = src.assignment dest.lockLevel = src.lockLevel # this fixes 'type TLock = TSysLock': |