added system.newSeqOfCap for improved efficiency

This commit is contained in:
Andreas Rumpf 2016-07-15 17:04:14 +02:00
commit b7c1be03c8
7 changed files with 47 additions and 4 deletions

View file

@ -1755,6 +1755,7 @@ proc genMagic(p: PProc, n: PNode, r: var TCompRes) =
else:
binaryExpr(p, n, r, "", "isset($1[$2])")
of mNewSeq: genNewSeq(p, n)
of mNewSeqOfCap: unaryExpr(p, n, r, "", "[]" | "array()")
of mOf: genOf(p, n, r)
of mReset: genReset(p, n)
of mEcho: genEcho(p, n, r)