diff options
author | Araq <rumpf_a@web.de> | 2013-05-02 00:36:06 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-05-02 00:36:06 +0200 |
commit | 1dd01e5891804c703019ed26d0ccd922a3bf810b (patch) | |
tree | 37754a783ce3bcf52a97731b1f2ecbcb1a8444a5 /compiler/ccgstmts.nim | |
parent | c75aa98706eabc6df6a0900bce52a52ea23ab671 (diff) | |
download | Nim-1dd01e5891804c703019ed26d0ccd922a3bf810b.tar.gz |
revert new scope for 'if'
Diffstat (limited to 'compiler/ccgstmts.nim')
-rw-r--r-- | compiler/ccgstmts.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 5fc06edfb..59cdbbef4 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -232,13 +232,14 @@ proc genIfStmt(p: BProc, n: PNode) = for i in countup(0, sonsLen(n) - 1): var it = n.sons[i] if it.len == 2: - startBlock(p) + when newScopeForIf: startBlock(p) initLocExpr(p, it.sons[0], a) Lelse = getLabel(p) inc(p.labels) lineFF(p, cpsStmts, "if (!$1) goto $2;$n", "br i1 $1, label %LOC$3, label %$2$n" & "LOC$3: $n", [rdLoc(a), Lelse, toRope(p.labels)]) + when not newScopeForIf: startBlock(p) genStmts(p, it.sons[1]) endBlock(p) if sonsLen(n) > 1: |