[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

@@ -10,6 +10,7 @@
#include "mtype.h"
#include "declaration.h"
#include "statement.h"
#include "gen/irstate.h"
#include "tollvm.h"
@@ -35,19 +36,21 @@ IRLoopScope::IRLoopScope()
{
}
IRLoopScope::IRLoopScope(Statement* s, TryFinallyStatement* enclosingtryfinally, llvm::BasicBlock* b, llvm::BasicBlock* e)
IRLoopScope::IRLoopScope(Statement* s, EnclosingHandler* enclosinghandler, llvm::BasicBlock* b, llvm::BasicBlock* e)
{
begin = b;
end = e;
//builder.SetInsertPoint(b);
this->s = s;
this->enclosingtryfinally = enclosingtryfinally;
this->enclosinghandler = enclosinghandler;
}
//////////////////////////////////////////////////////////////////////////////////////////
IRState::IRState()
{
interfaceInfoType = NULL;
mutexType = NULL;
dmodule = 0;
module = 0;
emitMain = false;