parent
cbb6001d1e
commit
9fb4c2b3c7
1 changed files with 1 additions and 1 deletions
|
|
@ -1647,6 +1647,7 @@ proc genArrToSeq(p: BProc, n: PNode, d: var TLoc) =
|
||||||
return
|
return
|
||||||
if d.k == locNone:
|
if d.k == locNone:
|
||||||
getTemp(p, n.typ, d)
|
getTemp(p, n.typ, d)
|
||||||
|
initLocExpr(p, n[1], a)
|
||||||
# generate call to newSeq before adding the elements per hand:
|
# generate call to newSeq before adding the elements per hand:
|
||||||
let L = toInt(lengthOrd(p.config, n[1].typ))
|
let L = toInt(lengthOrd(p.config, n[1].typ))
|
||||||
if optSeqDestructors in p.config.globalOptions:
|
if optSeqDestructors in p.config.globalOptions:
|
||||||
|
|
@ -1658,7 +1659,6 @@ proc genArrToSeq(p: BProc, n: PNode, d: var TLoc) =
|
||||||
var lit = newRopeAppender()
|
var lit = newRopeAppender()
|
||||||
intLiteral(L, lit)
|
intLiteral(L, lit)
|
||||||
genNewSeqAux(p, d, lit, L == 0)
|
genNewSeqAux(p, d, lit, L == 0)
|
||||||
initLocExpr(p, n[1], a)
|
|
||||||
# bug #5007; do not produce excessive C source code:
|
# bug #5007; do not produce excessive C source code:
|
||||||
if L < 10:
|
if L < 10:
|
||||||
for i in 0..<L:
|
for i in 0..<L:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue