Mercurial > projects > ldc
diff gen/asmstmt.cpp @ 309:d59c363fccad trunk
[svn r330] Implemented synchronized statements.
Changed the tryfinally handlers to a more generalized EnclosingHandler.
Changed ClassInfoS to be mutable so they can be used as locks.
Added new BB after throw ala return/break etc.
author | lindquist |
---|---|
date | Sat, 28 Jun 2008 11:37:53 +0200 |
parents | 2b72433d5c8c |
children | 553f844ae5b9 |
line wrap: on
line diff
--- a/gen/asmstmt.cpp Sat Jun 28 05:57:16 2008 +0200 +++ b/gen/asmstmt.cpp Sat Jun 28 11:37:53 2008 +0200 @@ -381,7 +381,7 @@ AsmBlockStatement::AsmBlockStatement(Loc loc, Statements* s) : CompoundStatement(loc, s) { - enclosingtryfinally = NULL; + enclosinghandler = NULL; } // rewrite argument indices to the block scope indices @@ -638,7 +638,7 @@ sw->addCase(llvm::ConstantInt::get(llvm::IntegerType::get(32), it->first), casebb); p->scope() = IRScope(casebb,bb); - DtoGoto(&loc, it->second, enclosingtryfinally); + DtoGoto(&loc, it->second, enclosinghandler); } p->scope() = IRScope(bb,oldend); @@ -669,7 +669,7 @@ // necessary for in-asm branches Statement *AsmBlockStatement::semantic(Scope *sc) { - enclosingtryfinally = sc->tfOfTry; + enclosinghandler = sc->tfOfTry; return CompoundStatement::semantic(sc); }