[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.
This commit is contained in:
Tomas Lindquist Olsen
2008-06-28 11:37:53 +02:00
parent ac3744a59d
commit 0d160ffc76
16 changed files with 350 additions and 177 deletions

View File

@@ -381,7 +381,7 @@ assert(0);
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 @@ void AsmBlockStatement::toIR(IRState* p)
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 @@ Statement *AsmBlockStatement::syntaxCopy()
// necessary for in-asm branches
Statement *AsmBlockStatement::semantic(Scope *sc)
{
enclosingtryfinally = sc->tfOfTry;
enclosinghandler = sc->tfOfTry;
return CompoundStatement::semantic(sc);
}