annotate gen/irstate.h @ 102:027b8d8b71ec trunk

[svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up. Basically it tries to do the following in order: Resolve types, Declare symbols, Create constant initializers, Apply initializers, Generate functions bodies. ClassInfo is now has the most useful(biased?) members working. Probably other stuf...
author lindquist
date Sun, 18 Nov 2007 06:52:57 +0100
parents 5071469303d4
children 855adfdb8d38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
1 #ifndef LLVMDC_GEN_IRSTATE_H
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
2 #define LLVMDC_GEN_IRSTATE_H
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
3
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
4 #include <stack>
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
5 #include <vector>
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
6 #include <deque>
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
7 #include <map>
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
8 #include <list>
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
9
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
10 #include "root.h"
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
11
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
12 // global ir state for current module
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
13 struct IRState;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
14 extern IRState* gIR;
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
15 extern const llvm::TargetData* gTargetData;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
16
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
17 struct TypeFunction;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
18 struct TypeStruct;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
19 struct ClassDeclaration;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
20 struct FuncDeclaration;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
21 struct Module;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
22 struct TypeStruct;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
23
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
24 /*
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
25 struct LLVMValue
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
26 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
27 std::vector<llvm::Value*> vals;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
28 };
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
29 */
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
30
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
31 // represents a scope
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
32 struct IRScope
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
33 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
34 llvm::BasicBlock* begin;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
35 llvm::BasicBlock* end;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
36 LLVMBuilder builder;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
37
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
38 IRScope();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
39 IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e);
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
40 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
41
6
35d93ce68cf4 [svn r10] Updated for LLVM rev. 20070913
lindquist
parents: 1
diff changeset
42 // represents a struct or class
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
43 struct IRStruct : Object
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
44 {
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
45 struct Offset
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
46 {
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
47 VarDeclaration* var;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
48 const llvm::Type* type;
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
49 llvm::Constant* init;
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
50
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
51 Offset(VarDeclaration* v, const llvm::Type* ty)
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
52 : var(v), type(ty), init(NULL) {}
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
53 };
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
54
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
55 typedef std::multimap<unsigned, Offset> OffsetMap;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
56 typedef std::vector<VarDeclaration*> VarDeclVector;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
57
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
58 public:
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
59 IRStruct();
6
35d93ce68cf4 [svn r10] Updated for LLVM rev. 20070913
lindquist
parents: 1
diff changeset
60 IRStruct(Type*);
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
61
6
35d93ce68cf4 [svn r10] Updated for LLVM rev. 20070913
lindquist
parents: 1
diff changeset
62 Type* type;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
63 llvm::PATypeHolder recty;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
64 OffsetMap offsets;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
65 VarDeclVector defaultFields;
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
66
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
67 bool defined;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
68 bool constinited;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
69 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
70
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
71 // represents a finally block
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
72 struct IRFinally
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
73 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
74 llvm::BasicBlock* bb;
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
75 llvm::BasicBlock* retbb;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
76
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
77 IRFinally();
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
78 IRFinally(llvm::BasicBlock* b, llvm::BasicBlock* rb);
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
79 };
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
80
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
81 // represents a function
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
82 struct IRFunction : Object
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
83 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
84 llvm::Function* func;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
85 llvm::Instruction* allocapoint;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
86 FuncDeclaration* decl;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
87 TypeFunction* type;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
88
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
89 // finally blocks
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
90 typedef std::vector<IRFinally> FinallyVec;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
91 FinallyVec finallys;
81
3587401b6eeb [svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
lindquist
parents: 73
diff changeset
92 llvm::Value* finallyretval;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
93
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
94 bool defined;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
95
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
96 IRFunction(FuncDeclaration*);
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
97 };
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
98
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
99 struct IRBuilderHelper
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
100 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
101 IRState* state;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
102 LLVMBuilder* operator->();
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
103 };
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
104
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
105 struct IRExp
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
106 {
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
107 Expression* e1;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
108 Expression* e2;
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
109 DValue* v;
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
110 IRExp();
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
111 IRExp(Expression* l, Expression* r, DValue* val);
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
112 };
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
113
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
114 // represents a global variable
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
115 struct IRGlobal : Object
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
116 {
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
117 VarDeclaration* var;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
118 llvm::PATypeHolder type;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
119
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
120 IRGlobal(VarDeclaration* v);
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
121 };
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
122
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
123 // represents the module
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
124 struct IRState
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
125 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
126 IRState();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
127
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
128 // module
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
129 Module* dmodule;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
130 llvm::Module* module;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
131
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
132 // functions
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
133 typedef std::vector<IRFunction*> FunctionVector;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
134 FunctionVector functions;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
135 IRFunction* func();
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
136
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
137 llvm::Function* topfunc();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
138 TypeFunction* topfunctype();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
139 llvm::Instruction* topallocapoint();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
140
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
141 // structs
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
142 typedef std::vector<IRStruct*> StructVector;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
143 StructVector structs;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
144 IRStruct* topstruct();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
145
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
146 // classes TODO move into IRClass
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
147 typedef std::vector<ClassDeclaration*> ClassDeclVec;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
148 ClassDeclVec classes;
15
37a4fdab33fc [svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents: 6
diff changeset
149
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
150 // D main function
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
151 bool emitMain;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
152 llvm::Function* mainFunc;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
153
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
154 // expression l/r value handling
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
155 typedef std::vector<IRExp> ExpVec;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
156 ExpVec exps;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
157 IRExp* topexp();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
158
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
159 // basic block scopes
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
160 std::vector<IRScope> scopes;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
161 IRScope& scope();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
162 llvm::BasicBlock* scopebegin();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
163 llvm::BasicBlock* scopeend();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
164 llvm::BasicBlock* scopebb();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
165 bool scopereturned();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
166
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
167 // loop blocks
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
168 typedef std::vector<IRScope> BBVec;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
169 BBVec loopbbs;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
170
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
171 // this holds the array being indexed or sliced so $ will work
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
172 // might be a better way but it works. problem is I only get a
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
173 // VarDeclaration for __dollar, but I can't see how to get the
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
174 // array pointer from this :(
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
175 std::vector<DValue*> arrays;
15
37a4fdab33fc [svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents: 6
diff changeset
176
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
177 // builder helper
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
178 IRBuilderHelper ir;
98
6789050b5ad1 [svn r102] Further delayed emission of function bodies to avoid problems with circular-forward-references.
lindquist
parents: 94
diff changeset
179
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
180 typedef std::list<Dsymbol*> DsymbolList;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
181 // dsymbols that need to be resolved
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
182 DsymbolList resolveList;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
183 // dsymbols that need to be declared
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
184 DsymbolList declareList;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
185 // dsymbols that need constant initializers constructed
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
186 DsymbolList constInitList;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
187 // dsymbols that need definitions
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
188 DsymbolList defineList;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
189 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
190
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
191 #endif // LLVMDC_GEN_IRSTATE_H