Mercurial > projects > ldc
diff dmd/statement.c @ 148:86d3bb8ca33e trunk
[svn r154] renaming enclosingtry to enclosingtryfinally to distinguish it from enclosingtrycatch, which will probably need to be added for exception handling
author | ChristianK |
---|---|
date | Sat, 22 Mar 2008 12:20:32 +0100 |
parents | 8f704cb9969b |
children | 5acec6b2eef8 |
line wrap: on
line diff
--- a/dmd/statement.c Thu Mar 13 18:37:52 2008 +0100 +++ b/dmd/statement.c Sat Mar 22 12:20:32 2008 +0100 @@ -561,7 +561,7 @@ : Statement(loc) { statements = s; - enclosingtry = NULL; + enclosingtryfinally = NULL; } Statement *UnrolledLoopStatement::syntaxCopy() @@ -583,7 +583,7 @@ { //printf("UnrolledLoopStatement::semantic(this = %p, sc = %p)\n", this, sc); - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; sc->noctor++; Scope *scd = sc->push(); @@ -774,7 +774,7 @@ { condition = c; body = b; - enclosingtry = NULL; + enclosingtryfinally = NULL; } Statement *WhileStatement::syntaxCopy() @@ -809,7 +809,7 @@ } #endif - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; condition = condition->semantic(sc); condition = resolveProperties(sc, condition); @@ -876,7 +876,7 @@ { body = b; condition = c; - enclosingtry = NULL; + enclosingtryfinally = NULL; } Statement *DoStatement::syntaxCopy() @@ -888,7 +888,7 @@ Statement *DoStatement::semantic(Scope *sc) { - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; sc->noctor++; if (body) @@ -952,7 +952,7 @@ this->condition = condition; this->increment = increment; this->body = body; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; } Statement *ForStatement::syntaxCopy() @@ -972,7 +972,7 @@ Statement *ForStatement::semantic(Scope *sc) { - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; ScopeDsymbol *sym = new ScopeDsymbol(); sym->parent = sc->scopesym; @@ -1086,7 +1086,7 @@ this->arguments = arguments; this->aggr = aggr; this->body = body; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; this->key = NULL; this->value = NULL; @@ -1115,7 +1115,7 @@ Type *tn = NULL; Type *tnv = NULL; - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; func = sc->func; if (func->fes) @@ -1971,7 +1971,7 @@ cases = NULL; hasNoDefault = 0; // LLVMDC - enclosingtry = NULL; + enclosingtryfinally = NULL; } Statement *SwitchStatement::syntaxCopy() @@ -1986,7 +1986,7 @@ //printf("SwitchStatement::semantic(%p)\n", this); assert(!cases); // ensure semantic() is only run once - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; condition = condition->semantic(sc); condition = resolveProperties(sc, condition); @@ -2274,7 +2274,7 @@ : Statement(loc) { sw = NULL; - enclosingtry = NULL; + enclosingtryfinally = NULL; } Statement *GotoDefaultStatement::syntaxCopy() @@ -2285,7 +2285,7 @@ Statement *GotoDefaultStatement::semantic(Scope *sc) { - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; sw = sc->sw; if (!sw) error("goto default not in switch statement"); @@ -2309,7 +2309,7 @@ { cs = NULL; this->exp = exp; - enclosingtry = NULL; + enclosingtryfinally = NULL; sw = NULL; } @@ -2322,7 +2322,7 @@ Statement *GotoCaseStatement::semantic(Scope *sc) { - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; if (exp) exp = exp->semantic(sc); @@ -2381,7 +2381,7 @@ : Statement(loc) { this->exp = exp; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; } Statement *ReturnStatement::syntaxCopy() @@ -2396,7 +2396,7 @@ Statement *ReturnStatement::semantic(Scope *sc) { //printf("ReturnStatement::semantic() %s\n", toChars()); - this->enclosingtry = sc->tfOfTry; + this->enclosingtryfinally = sc->tfOfTry; FuncDeclaration *fd = sc->parent->isFuncDeclaration(); Scope *scx = sc; @@ -2657,7 +2657,7 @@ : Statement(loc) { this->ident = ident; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; } Statement *BreakStatement::syntaxCopy() @@ -2668,7 +2668,7 @@ Statement *BreakStatement::semantic(Scope *sc) { - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; // If: // break Identifier; if (ident) @@ -2751,7 +2751,7 @@ : Statement(loc) { this->ident = ident; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; } Statement *ContinueStatement::syntaxCopy() @@ -2762,7 +2762,7 @@ Statement *ContinueStatement::semantic(Scope *sc) { - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; //printf("ContinueStatement::semantic() %p\n", this); if (ident) { @@ -3195,7 +3195,7 @@ { this->body = body; this->finalbody = finalbody; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; } Statement *TryFinallyStatement::syntaxCopy() @@ -3209,10 +3209,10 @@ { //printf("TryFinallyStatement::semantic()\n"); - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; sc->tfOfTry = this; body = body->semantic(sc); - sc->tfOfTry = enclosingtry; + sc->tfOfTry = enclosingtryfinally; sc = sc->push(); sc->tf = this; @@ -3447,7 +3447,7 @@ this->ident = ident; this->label = NULL; this->tf = NULL; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; } Statement *GotoStatement::syntaxCopy() @@ -3461,7 +3461,7 @@ //printf("GotoStatement::semantic()\n"); tf = sc->tf; - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; label = fd->searchLabel(ident); if (!label->statement && sc->fes) { @@ -3505,7 +3505,7 @@ this->ident = ident; this->statement = statement; this->tf = NULL; - this->enclosingtry = NULL; + this->enclosingtryfinally = NULL; this->lblock = NULL; this->isReturnLabel = 0; this->llvmBB = NULL; @@ -3528,7 +3528,7 @@ else ls->statement = this; tf = sc->tf; - enclosingtry = sc->tfOfTry; + enclosingtryfinally = sc->tfOfTry; sc = sc->push(); sc->scopesym = sc->enclosing->scopesym; sc->callSuper |= CSXlabel;