gc:destructors: more progress

This commit is contained in:
Andreas Rumpf 2018-11-29 20:10:52 +01:00
commit 350396e1ca
4 changed files with 18 additions and 22 deletions

View file

@ -220,7 +220,7 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
typ.align = int16(conf.target.ptrSize)
of tyString:
if tfHasAsgn in typ.flags:
if conf.selectedGC == gcDestructors:
typ.size = conf.target.ptrSize * 2
else:
typ.size = conf.target.ptrSize
@ -243,7 +243,7 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
return
typ.align = int16(conf.target.ptrSize)
if typ.kind == tySequence and tfHasAsgn in typ.flags:
if typ.kind == tySequence and conf.selectedGC == gcDestructors:
typ.size = conf.target.ptrSize * 2
else:
typ.size = conf.target.ptrSize