mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
arc optimizations (#13325)
* scope based destructors * handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim * make this branch mergable, logic is disabled for now
This commit is contained in:
@@ -451,6 +451,7 @@ for expressions of type ``lent T`` or of type ``var T``.
|
||||
result = Tree(kids: kids)
|
||||
# converted into:
|
||||
`=sink`(result.kids, kids); wasMoved(kids)
|
||||
`=destroy`(kids)
|
||||
|
||||
proc `[]`*(x: Tree; i: int): lent Tree =
|
||||
result = x.kids[i]
|
||||
|
||||
Reference in New Issue
Block a user