first implementation of the new --seqsv2 switch

This commit is contained in:
Araq 2019-10-19 19:30:48 +02:00 • committed by Andreas Rumpf
commit 0eae2217b6
7 changed files with 22 additions and 15 deletions

View file

@ -518,7 +518,7 @@ else:
else:
include "system/gc"
when not declared(nimNewSeqOfCap) and not defined(gcDestructors):
when not declared(nimNewSeqOfCap) and not defined(nimSeqsV2):
proc nimNewSeqOfCap(typ: PNimType, cap: int): pointer {.compilerproc.} =
when defined(gcRegions):
let s = mulInt(cap, typ.base.size) # newStr already adds GenericSeqSize