ORC/ARC async progress (#15370)

* ARC/ORC: fixes memory leak for empty seqs that have a non-zero capacity

* async: minor refactorings

* it helps to finish a refactoring
This commit is contained in:
Andreas Rumpf
2020-09-20 00:27:32 +02:00
committed by GitHub
parent cbdda631db
commit a15d77df7e
3 changed files with 10 additions and 11 deletions

View File

@@ -2164,7 +2164,7 @@ proc genMove(p: BProc; n: PNode; d: var TLoc) =
# generated by liftdestructors:
var src: TLoc
initLocExpr(p, n[2], src)
linefmt(p, cpsStmts, "if ($1.len && $1.p != $2.p) {", [rdLoc(a), rdLoc(src)])
linefmt(p, cpsStmts, "if ($1.p != $2.p) {", [rdLoc(a), rdLoc(src)])
genStmts(p, n[3])
linefmt(p, cpsStmts, "}$n$1.len = $2.len; $1.p = $2.p;$n", [rdLoc(a), rdLoc(src)])
else: