WIP: strings/seqs based on destructors

This commit is contained in:
Andreas Rumpf 2018-07-17 13:19:42 +02:00
commit 32afdc09c6
13 changed files with 240 additions and 141 deletions

View file

@ -250,7 +250,10 @@ proc lenExpr(p: BProc; a: TLoc): Rope =
result = "($1 ? $1->$2 : 0)" % [rdLoc(a), lenField(p)]
proc dataField(p: BProc): Rope =
result = rope"->data"
if p.config.selectedGc == gcDestructors:
result = rope".p->data"
else:
result = rope"->data"
include ccgliterals
include ccgtypes