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:
parent
a96842aaeb
commit
fb641483f0
11 changed files with 312 additions and 95 deletions
|
|
@ -2573,6 +2573,10 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
|
|||
else:
|
||||
putLocIntoDest(p, d, sym.loc)
|
||||
of skTemp:
|
||||
if sym.loc.r == nil:
|
||||
# we now support undeclared 'skTemp' variables for easier
|
||||
# transformations in other parts of the compiler:
|
||||
assignLocalVar(p, n)
|
||||
if sym.loc.r == nil or sym.loc.t == nil:
|
||||
#echo "FAILED FOR PRCO ", p.prc.name.s
|
||||
#echo renderTree(p.prc.ast, {renderIds})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue