newruntime: fixes another bug
This commit is contained in:
parent
28b4db4470
commit
a34ce2714a
5 changed files with 247 additions and 4 deletions
|
|
@ -425,6 +425,9 @@ proc sinkParamIsLastReadCheck(c: var Con, s: PNode) =
|
|||
proc passCopyToSink(n: PNode; c: var Con): PNode =
|
||||
result = newNodeIT(nkStmtListExpr, n.info, n.typ)
|
||||
let tmp = getTemp(c, n.typ, n.info)
|
||||
# XXX This is only required if we are in a loop. Since we move temporaries
|
||||
# out of loops we need to mark it as 'wasMoved'.
|
||||
result.add genWasMoved(tmp, c)
|
||||
if hasDestructor(n.typ):
|
||||
var m = genCopy(c, n.typ, tmp, n)
|
||||
m.add p(n, c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue