diff gen/irstate.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 88252a1af660
children 9967a3270837
line wrap: on
line diff
--- a/gen/irstate.cpp	Sat Jun 28 05:57:16 2008 +0200
+++ b/gen/irstate.cpp	Sat Jun 28 11:37:53 2008 +0200
@@ -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(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;