compiler generates volatile temps to keep C compiler from optimizing away stack roots
This commit is contained in:
parent
af792da0bb
commit
94358e03e9
5 changed files with 85 additions and 28 deletions
|
|
@ -252,6 +252,7 @@ proc genCall(p: BProc, e: PNode, d: var TLoc) =
|
|||
genNamedParamCall(p, e, d)
|
||||
else:
|
||||
genPrefixCall(p, nil, e, d)
|
||||
if d.s == onStack and containsGarbageCollectedRef(d.t): keepAlive(p, d)
|
||||
|
||||
proc genAsgnCall(p: BProc, le, ri: PNode, d: var TLoc) =
|
||||
if ri.sons[0].kind == nkSym and sfInfixCall in ri.sons[0].sym.flags and
|
||||
|
|
@ -261,4 +262,5 @@ proc genAsgnCall(p: BProc, le, ri: PNode, d: var TLoc) =
|
|||
genNamedParamCall(p, ri, d)
|
||||
else:
|
||||
genPrefixCall(p, le, ri, d)
|
||||
if d.s == onStack and containsGarbageCollectedRef(d.t): keepAlive(p, d)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue