Mercurial > projects > ldc
annotate gen/elem.h @ 34:4648206ca213 trunk
[svn r38] * resizing dynamic arrays support
* throw is replaced with assert(0)
* catch is ignored
* better foreach support
* various bugfixes
author | lindquist |
---|---|
date | Tue, 09 Oct 2007 02:50:00 +0200 |
parents | 37a4fdab33fc |
children | 8b0e809563df |
rev | line source |
---|---|
1 | 1 #ifndef LLVMDC_GEN_ELEM_H |
2 #define LLVMDC_GEN_ELEM_H | |
3 | |
4 #include "llvm/Value.h" | |
5 | |
6 #include "root.h" | |
7 #include "declaration.h" | |
8 #include "aggregate.h" | |
9 | |
10 // represents a value. be it a constant literal, a variable etc. | |
11 // maintains all the information for doing load/store appropriately | |
12 struct elem : Object | |
13 { | |
14 enum { | |
15 NONE, | |
16 VAR, | |
17 VAL, | |
18 FUNC, | |
19 CONST, | |
20 NUL, | |
21 REF, | |
34 | 22 SLICE, |
23 ARRAYLEN | |
1 | 24 }; |
25 | |
26 public: | |
27 elem(); | |
28 | |
29 llvm::Value* mem; | |
30 llvm::Value* val; | |
31 llvm::Value* arg; | |
32 int type; | |
33 bool inplace; | |
34 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
|
35 unsigned callconv; |
15
37a4fdab33fc
[svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents:
11
diff
changeset
|
36 bool isthis; |
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 |