annotate gen/irstate.h @ 108:288fe1029e1f trunk

[svn r112] Fixed 'case 1,2,3:' style case statements. Fixed a bunch of bugs with return/break/continue in loops. Fixed support for the DMDFE hidden implicit return value variable. This can be needed for some foreach statements where the loop body is converted to a nested delegate, but also possibly returns from the function. Added std.math to phobos. Added AA runtime support code, done ground work for implementing AAs. Several other bugfixes.
author lindquist
date Tue, 20 Nov 2007 05:29:20 +0100
parents 855adfdb8d38
children 27b9f749d9fe
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:
6
35d93ce68cf4 [svn r10] Updated for LLVM rev. 20070913
lindquist
parents: 1
diff changeset
59 IRStruct(Type*);
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
60
6
35d93ce68cf4 [svn r10] Updated for LLVM rev. 20070913
lindquist
parents: 1
diff changeset
61 Type* type;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
62 llvm::PATypeHolder recty;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
63 OffsetMap offsets;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
64 VarDeclVector defaultFields;
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
65
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
66 bool defined;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
67 bool constinited;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
68 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
69
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
70 // represents a finally block
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
71 struct IRFinally
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
72 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
73 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
74 llvm::BasicBlock* retbb;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
75
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
76 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
77 IRFinally(llvm::BasicBlock* b, llvm::BasicBlock* rb);
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
78 };
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 // represents a function
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
81 struct IRFunction : Object
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
82 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
83 llvm::Function* func;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
84 llvm::Instruction* allocapoint;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
85 FuncDeclaration* decl;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
86 TypeFunction* type;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
87
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
88 // finally blocks
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
89 typedef std::vector<IRFinally> FinallyVec;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
90 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
91 llvm::Value* finallyretval;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
92
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
93 bool defined;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
94
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
95 IRFunction(FuncDeclaration*);
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
96 };
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 struct IRBuilderHelper
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
99 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
100 IRState* state;
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
101 LLVMBuilder* operator->();
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
102 };
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
103
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
104 struct IRExp
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
105 {
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
106 Expression* e1;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
107 Expression* e2;
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
108 DValue* v;
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
109 IRExp();
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
110 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
111 };
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
112
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
113 // represents a global variable
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
114 struct IRGlobal : Object
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
115 {
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
116 VarDeclaration* var;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
117 llvm::PATypeHolder type;
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
118
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
119 IRGlobal(VarDeclaration* v);
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
120 };
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
121
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
122 // represents the module
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
123 struct IRState
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
124 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
125 IRState();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
126
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
127 // module
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
128 Module* dmodule;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
129 llvm::Module* module;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
130
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
131 // functions
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
132 typedef std::vector<IRFunction*> FunctionVector;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
133 FunctionVector functions;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
134 IRFunction* func();
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
135
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
136 llvm::Function* topfunc();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
137 TypeFunction* topfunctype();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
138 llvm::Instruction* topallocapoint();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
139
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
140 // structs
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
141 typedef std::vector<IRStruct*> StructVector;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
142 StructVector structs;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
143 IRStruct* topstruct();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
144
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
145 // classes TODO move into IRClass
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
146 typedef std::vector<ClassDeclaration*> ClassDeclVec;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
147 ClassDeclVec classes;
15
37a4fdab33fc [svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents: 6
diff changeset
148
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
149 // D main function
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
150 bool emitMain;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
151 llvm::Function* mainFunc;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
152
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
153 // expression l/r value handling
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
154 typedef std::vector<IRExp> ExpVec;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
155 ExpVec exps;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
156 IRExp* topexp();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
157
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
158 // basic block scopes
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
159 std::vector<IRScope> scopes;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
160 IRScope& scope();
108
288fe1029e1f [svn r112] Fixed 'case 1,2,3:' style case statements.
lindquist
parents: 103
diff changeset
161 llvm::BasicBlock* scopebb();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
162 llvm::BasicBlock* scopeend();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
163 bool scopereturned();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
164
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
165 // loop blocks
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
166 typedef std::vector<IRScope> BBVec;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
167 BBVec loopbbs;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
168
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
169 // 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
170 // 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
171 // 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
172 // 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
173 std::vector<DValue*> arrays;
15
37a4fdab33fc [svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents: 6
diff changeset
174
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
175 // builder helper
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
176 IRBuilderHelper ir;
98
6789050b5ad1 [svn r102] Further delayed emission of function bodies to avoid problems with circular-forward-references.
lindquist
parents: 94
diff changeset
177
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
178 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
179 // 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
180 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
181 // 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
182 DsymbolList declareList;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
183 // 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
184 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
185 // 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
186 DsymbolList defineList;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
187 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
188
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
189 #endif // LLVMDC_GEN_IRSTATE_H