diff gen/llvmhelpers.h @ 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 6057fdf797d8
line wrap: on
line diff
--- a/gen/llvmhelpers.h	Sat Jun 28 05:57:16 2008 +0200
+++ b/gen/llvmhelpers.h	Sat Jun 28 11:37:53 2008 +0200
@@ -16,12 +16,22 @@
 // return the LabelStatement from the current function with the given identifier or NULL if not found
 LabelStatement* DtoLabelStatement(Identifier* ident);
 // emit goto
-void DtoGoto(Loc* loc, Identifier* target, TryFinallyStatement* enclosingtryfinally);
+void DtoGoto(Loc* loc, Identifier* target, EnclosingHandler* enclosingtryfinally);
 
 // generates IR for finally blocks between the 'start' and 'end' statements
 // will begin with the finally block belonging to 'start' and does not include
 // the finally block of 'end'
-void DtoFinallyBlocks(TryFinallyStatement* start, TryFinallyStatement* end);
+void DtoEnclosingHandlers(EnclosingHandler* start, EnclosingHandler* end);
+
+// enters a critical section
+void DtoEnterCritical(LLValue* g);
+// leaves a critical section
+void DtoLeaveCritical(LLValue* g);
+
+// enters a monitor lock
+void DtoEnterMonitor(LLValue* v);
+// leaves a monitor lock
+void DtoLeaveMonitor(LLValue* v);
 
 // nested variable/class helpers
 LLValue* DtoNestedContext(FuncDeclaration* func);