Mercurial > projects > ldc
annotate gen/elem.h @ 83:339422268de1 trunk
[svn r87] Fixed some memory bloat when passing string literals as char[] params (double temporary before)
author | lindquist |
---|---|
date | Fri, 02 Nov 2007 02:03:13 +0100 |
parents | 0c77619e803b |
children | fd32135dca3e |
rev | line source |
---|---|
1 | 1 #ifndef LLVMDC_GEN_ELEM_H |
2 #define LLVMDC_GEN_ELEM_H | |
3 | |
4 #include "root.h" | |
5 #include "declaration.h" | |
6 #include "aggregate.h" | |
7 | |
8 // represents a value. be it a constant literal, a variable etc. | |
9 // maintains all the information for doing load/store appropriately | |
10 struct elem : Object | |
11 { | |
12 enum { | |
13 NONE, | |
14 VAR, | |
15 VAL, | |
16 FUNC, | |
17 CONST, | |
18 NUL, | |
19 REF, | |
34 | 20 SLICE, |
21 ARRAYLEN | |
1 | 22 }; |
23 | |
24 public: | |
25 elem(); | |
26 | |
27 llvm::Value* mem; | |
28 llvm::Value* val; | |
29 llvm::Value* arg; | |
30 int type; | |
31 bool inplace; | |
32 bool field; | |
11
d3ee9efe20e2
[svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents:
1
diff
changeset
|
33 unsigned callconv; |
15
37a4fdab33fc
[svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents:
11
diff
changeset
|
34 bool isthis; |
52 | 35 bool istypeinfo; |
83
339422268de1
[svn r87] Fixed some memory bloat when passing string literals as char[] params (double temporary before)
lindquist
parents:
52
diff
changeset
|
36 bool temp; |
1 | 37 |
38 VarDeclaration* vardecl; | |
39 FuncDeclaration* funcdecl; | |
40 | |
41 llvm::Value* getValue(); | |
42 //llvm::Value* getMemory(); | |
43 | |
44 bool isNull() {return !(mem || val);} | |
45 }; | |
46 | |
47 #endif // LLVMDC_GEN_ELEM_H |