refactoring: use the new strings and seqs when optSeqDestructors is active

This commit is contained in:
Araq 2019-10-19 18:03:50 +02:00 • committed by Andreas Rumpf
commit ed2fb36bc6
9 changed files with 45 additions and 66 deletions

View file

@ -231,7 +231,7 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
typ.size = conf.target.ptrSize
typ.align = int16(conf.target.ptrSize)
of tyString:
if conf.selectedGC == gcDestructors:
if optSeqDestructors in conf.globalOptions:
typ.size = conf.target.ptrSize * 2
else:
typ.size = conf.target.ptrSize
@ -245,7 +245,7 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
typ.paddingAtEnd = szIllegalRecursion
return
typ.align = int16(conf.target.ptrSize)
if typ.kind == tySequence and conf.selectedGC == gcDestructors:
if typ.kind == tySequence and optSeqDestructors in conf.globalOptions:
typ.size = conf.target.ptrSize * 2
else:
typ.size = conf.target.ptrSize