dfa.nim: track object/tuple field accesses more precisely; sink(o.x); sink(o.y) needs to compile; activate the tuple unpacking transf.nim bugfix

This commit is contained in:
Araq 2019-04-15 17:57:59 +02:00
commit 045e026d0e
8 changed files with 135 additions and 47 deletions

View file

@ -88,8 +88,8 @@ proc `-`*(a: sink Matrix; b: Matrix): Matrix =
doAssert(a.len == b.len) # non destructive use before sink is ok
result = a
for i in 0 ..< result.m:
for j in 0 ..< result.n:
result[i, j] = a[i, j] - b[i, j]
for j in 0 ..< result.n:
result[i, j] = a[i, j] - b[i, j]
proc info =
echo "after ", allocCount, " ", deallocCount