Mercurial > projects > ldc
comparison gen/nested.h @ 1207:83d3b25c2213
Isolate all knowledge of what a function's nested context looks like in a
single place. No functional change.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 12 Apr 2009 13:08:24 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1206:a5bfed1f6775 | 1207:83d3b25c2213 |
---|---|
1 #ifndef LDC_GEN_NESTED_H | |
2 #define LDC_GEN_NESTED_H | |
3 | |
4 #include "declaration.h" | |
5 #include "mtype.h" | |
6 #include "gen/dvalue.h" | |
7 | |
8 /////////////////////////////////////////////////////////// | |
9 // Nested variable and context helpers | |
10 /////////////////////////////////////////////////////////// | |
11 | |
12 /// Creates the context value for a nested function. | |
13 void DtoCreateNestedContext(FuncDeclaration* fd); | |
14 | |
15 /// Allocate space for variable accessed from nested function. | |
16 void DtoNestedInit(VarDeclaration* vd); | |
17 | |
18 /// Gets the context value for a call to a nested function or newing a nested | |
19 /// class with arbitrary nesting. | |
20 llvm::Value* DtoNestedContext(Loc loc, Dsymbol* sym); | |
21 | |
22 /// Gets the DValue of a nested variable with arbitrary nesting. | |
23 DValue* DtoNestedVariable(Loc loc, Type* astype, VarDeclaration* vd); | |
24 | |
25 #endif |