code cleanup: remove newScopeForIf switch
This commit is contained in:
parent
86a7054c88
commit
db35ac435b
5 changed files with 4 additions and 78 deletions
|
|
@ -340,13 +340,12 @@ proc genIf(p: BProc, n: PNode, d: var TLoc) =
|
|||
# bug #4230: avoid false sharing between branches:
|
||||
if d.k == locTemp and isEmptyType(n.typ): d.k = locNone
|
||||
if it.len == 2:
|
||||
when newScopeForIf: startBlock(p)
|
||||
startBlock(p)
|
||||
initLocExprSingleUse(p, it.sons[0], a)
|
||||
lelse = getLabel(p)
|
||||
inc(p.labels)
|
||||
lineF(p, cpsStmts, "if (!$1) goto $2;$n",
|
||||
[rdLoc(a), lelse])
|
||||
when not newScopeForIf: startBlock(p)
|
||||
if p.module.compileToCpp:
|
||||
# avoid "jump to label crosses initialization" error:
|
||||
add(p.s(cpsStmts), "{")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue