comparison 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
comparison
equal deleted inserted replaced
308:6b62e8cdf970 309:d59c363fccad
14 void DtoAssert(Loc* loc, DValue* msg); 14 void DtoAssert(Loc* loc, DValue* msg);
15 15
16 // return the LabelStatement from the current function with the given identifier or NULL if not found 16 // return the LabelStatement from the current function with the given identifier or NULL if not found
17 LabelStatement* DtoLabelStatement(Identifier* ident); 17 LabelStatement* DtoLabelStatement(Identifier* ident);
18 // emit goto 18 // emit goto
19 void DtoGoto(Loc* loc, Identifier* target, TryFinallyStatement* enclosingtryfinally); 19 void DtoGoto(Loc* loc, Identifier* target, EnclosingHandler* enclosingtryfinally);
20 20
21 // generates IR for finally blocks between the 'start' and 'end' statements 21 // generates IR for finally blocks between the 'start' and 'end' statements
22 // will begin with the finally block belonging to 'start' and does not include 22 // will begin with the finally block belonging to 'start' and does not include
23 // the finally block of 'end' 23 // the finally block of 'end'
24 void DtoFinallyBlocks(TryFinallyStatement* start, TryFinallyStatement* end); 24 void DtoEnclosingHandlers(EnclosingHandler* start, EnclosingHandler* end);
25
26 // enters a critical section
27 void DtoEnterCritical(LLValue* g);
28 // leaves a critical section
29 void DtoLeaveCritical(LLValue* g);
30
31 // enters a monitor lock
32 void DtoEnterMonitor(LLValue* v);
33 // leaves a monitor lock
34 void DtoLeaveMonitor(LLValue* v);
25 35
26 // nested variable/class helpers 36 // nested variable/class helpers
27 LLValue* DtoNestedContext(FuncDeclaration* func); 37 LLValue* DtoNestedContext(FuncDeclaration* func);
28 LLValue* DtoNestedVariable(VarDeclaration* vd); 38 LLValue* DtoNestedVariable(VarDeclaration* vd);
29 39