new move analyser2 (#20471)
* produce better code for closure environment creation * new 'first write' analysis; * scope based move analyser * code cleanup Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
parent
cfff454cf9
commit
8d47bf1822
19 changed files with 472 additions and 684 deletions
|
|
@ -18,7 +18,7 @@ proc createTree(x: int): Foo =
|
|||
proc take2(a, b: sink Foo) =
|
||||
echo a.x, " ", b.x
|
||||
|
||||
proc allowThis() =
|
||||
when false:
|
||||
var otherTree: Foo
|
||||
try:
|
||||
for i in 0..3:
|
||||
|
|
@ -47,7 +47,7 @@ proc preventThis2() =
|
|||
finally:
|
||||
echo otherTree
|
||||
|
||||
allowThis()
|
||||
#allowThis()
|
||||
preventThis2()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue