annotate gen/irstate.h @ 302:bef811104734 trunk

[svn r323] Branching out of inline asm works. Renamed emit_finallyblocks to DtoFinallyBlocks and moved to llvmhelpers. Added enclosingtryfinally to AsmBlockStatement, so branches out of asm blocks respect finallys. Refactored some GotoStatement code into DtoGoto.
author ChristianK
date Wed, 25 Jun 2008 20:39:09 +0200
parents df8a7b8d5929
children 2b72433d5c8c
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 <vector>
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
5 #include <list>
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
6
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
7 #include "root.h"
113
27b9f749d9fe [svn r117] Initial working implementation of interfaces.
lindquist
parents: 108
diff changeset
8 #include "aggregate.h"
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
9
136
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
10 #include "ir/irfunction.h"
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
11 #include "ir/irstruct.h"
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
12 #include "ir/irvar.h"
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
13
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
14 // global ir state for current module
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
15 struct IRState;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
16 extern IRState* gIR;
73
b706170e24a9 [svn r77] Fixed foreach on slice.
lindquist
parents: 54
diff changeset
17 extern const llvm::TargetData* gTargetData;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
18
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
19 struct TypeFunction;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
20 struct TypeStruct;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
21 struct ClassDeclaration;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
22 struct FuncDeclaration;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
23 struct Module;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
24 struct TypeStruct;
113
27b9f749d9fe [svn r117] Initial working implementation of interfaces.
lindquist
parents: 108
diff changeset
25 struct BaseClass;
145
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
26 struct TryFinallyStatement;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
27
156
ccd07d9f2ce9 [svn r172] moving all IR state previously stored in Dsymbol into IrDsymbol and a Dsymbol->IrDsymbol map
ChristianK
parents: 155
diff changeset
28 struct IrModule;
ccd07d9f2ce9 [svn r172] moving all IR state previously stored in Dsymbol into IrDsymbol and a Dsymbol->IrDsymbol map
ChristianK
parents: 155
diff changeset
29
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
30 // represents a scope
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
31 struct IRScope
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
32 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
33 llvm::BasicBlock* begin;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
34 llvm::BasicBlock* end;
205
9d44ec83acd1 [svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
lindquist
parents: 189
diff changeset
35 IRBuilder builder;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
36
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
37 IRScope();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
38 IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e);
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
39 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
40
145
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
41 // scope for loops
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
42 struct IRLoopScope : IRScope
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
43 {
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
44 // generating statement
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
45 Statement* s;
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
46 // the try of a TryFinally that encloses the loop
148
86d3bb8ca33e [svn r154] renaming enclosingtry to enclosingtryfinally to distinguish it from enclosingtrycatch, which will probably need to be added for exception handling
ChristianK
parents: 145
diff changeset
47 TryFinallyStatement* enclosingtryfinally;
145
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
48
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
49 IRLoopScope();
148
86d3bb8ca33e [svn r154] renaming enclosingtry to enclosingtryfinally to distinguish it from enclosingtrycatch, which will probably need to be added for exception handling
ChristianK
parents: 145
diff changeset
50 IRLoopScope(Statement* s, TryFinallyStatement* enclosingtryfinally, llvm::BasicBlock* b, llvm::BasicBlock* e);
145
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
51 };
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
52
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
53 struct IRBuilderHelper
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
54 {
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
55 IRState* state;
205
9d44ec83acd1 [svn r221] Update: Switched to the 2.3 LLVM svn branch, http://llvm.org/svn/llvm-project/llvm/branches/release_23 .
lindquist
parents: 189
diff changeset
56 IRBuilder* operator->();
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
57 };
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
58
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
59 struct IRExp
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
60 {
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
61 Expression* e1;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
62 Expression* e2;
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
63 DValue* v;
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
64 IRExp();
86
fd32135dca3e [svn r90] Major updates to the gen directory. Redesigned the 'elem' struct. Much more... !!!
lindquist
parents: 82
diff changeset
65 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
66 };
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
67
232
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
68 struct IRAsmStmt
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
69 {
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
70 std::string code;
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
71 std::string out_c;
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
72 std::string in_c;
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
73 std::vector<LLValue*> out;
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
74 std::vector<LLValue*> in;
299
df8a7b8d5929 [svn r320] Begun work on branches out of asm blocks. Unfinished.
ChristianK
parents: 252
diff changeset
75
302
bef811104734 [svn r323] Branching out of inline asm works.
ChristianK
parents: 299
diff changeset
76 // if this is nonzero, it contains the target label
bef811104734 [svn r323] Branching out of inline asm works.
ChristianK
parents: 299
diff changeset
77 LabelDsymbol* isBranchToLabel;
232
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
78 };
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
79
233
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
80 struct IRAsmBlock
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
81 {
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
82 std::vector<IRAsmStmt*> s;
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
83 std::set<std::string> clobs;
299
df8a7b8d5929 [svn r320] Begun work on branches out of asm blocks. Unfinished.
ChristianK
parents: 252
diff changeset
84
df8a7b8d5929 [svn r320] Begun work on branches out of asm blocks. Unfinished.
ChristianK
parents: 252
diff changeset
85 // stores the labels within the asm block
df8a7b8d5929 [svn r320] Begun work on branches out of asm blocks. Unfinished.
ChristianK
parents: 252
diff changeset
86 std::vector<Identifier*> internalLabels;
233
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
87 };
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
88
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
89 // represents the module
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
90 struct IRState
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
91 {
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
92 IRState();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
93
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
94 // module
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
95 Module* dmodule;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
96 llvm::Module* module;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
97
161
3a891cfcd249 [svn r177] moved variable for interface info type from being local static to being within IRState
ChristianK
parents: 157
diff changeset
98 // interface info type, used in DtoInterfaceInfoType
3a891cfcd249 [svn r177] moved variable for interface info type from being local static to being within IRState
ChristianK
parents: 157
diff changeset
99 llvm::StructType* interfaceInfoType;
3a891cfcd249 [svn r177] moved variable for interface info type from being local static to being within IRState
ChristianK
parents: 157
diff changeset
100
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
101 // functions
136
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
102 typedef std::vector<IrFunction*> FunctionVector;
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
103 FunctionVector functions;
136
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
104 IrFunction* func();
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
105
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
106 llvm::Function* topfunc();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
107 TypeFunction* topfunctype();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
108 llvm::Instruction* topallocapoint();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
109
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
110 // structs
136
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
111 typedef std::vector<IrStruct*> StructVector;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
112 StructVector structs;
136
0e28624814e8 [svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
lindquist
parents: 116
diff changeset
113 IrStruct* topstruct();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
114
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
115 // classes TODO move into IRClass
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
116 typedef std::vector<ClassDeclaration*> ClassDeclVec;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
117 ClassDeclVec classes;
15
37a4fdab33fc [svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents: 6
diff changeset
118
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
119 // D main function
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
120 bool emitMain;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
121 llvm::Function* mainFunc;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
122
54
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
123 // expression l/r value handling
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
124 typedef std::vector<IRExp> ExpVec;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
125 ExpVec exps;
28e99b04a132 [svn r58] Fixed cond expression resulting in a non-basic type.
lindquist
parents: 40
diff changeset
126 IRExp* topexp();
1
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 // basic block scopes
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
129 std::vector<IRScope> scopes;
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
130 IRScope& scope();
108
288fe1029e1f [svn r112] Fixed 'case 1,2,3:' style case statements.
lindquist
parents: 103
diff changeset
131 llvm::BasicBlock* scopebb();
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
132 llvm::BasicBlock* scopeend();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
133 bool scopereturned();
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
134
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
135 // loop blocks
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
136 typedef std::vector<IRScope> BBVec;
145
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
137 typedef std::vector<IRLoopScope> LoopScopeVec;
8f704cb9969b [svn r150] fixes #16 and #17, implements GotoCaseStatement
ChristianK
parents: 136
diff changeset
138 LoopScopeVec loopbbs;
1
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 // 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
141 // 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
142 // 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
143 // 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
144 std::vector<DValue*> arrays;
15
37a4fdab33fc [svn r19] * Added support for reassigning 'this' inside class constructors.
lindquist
parents: 6
diff changeset
145
40
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
146 // builder helper
8b0e809563df [svn r44] Lots of bug fixes.
lindquist
parents: 31
diff changeset
147 IRBuilderHelper ir;
98
6789050b5ad1 [svn r102] Further delayed emission of function bodies to avoid problems with circular-forward-references.
lindquist
parents: 94
diff changeset
148
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
149 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
150 // 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
151 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
152 // 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
153 DsymbolList declareList;
100
5071469303d4 [svn r104] TONS OF FIXES.
lindquist
parents: 98
diff changeset
154 // 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
155 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
156 // 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
157 DsymbolList defineList;
116
fd7ad91fd713 [svn r120] ModuleInfo implementation is now almost complete.
lindquist
parents: 113
diff changeset
158
fd7ad91fd713 [svn r120] ModuleInfo implementation is now almost complete.
lindquist
parents: 113
diff changeset
159 // static ctors/dtors/unittests
fd7ad91fd713 [svn r120] ModuleInfo implementation is now almost complete.
lindquist
parents: 113
diff changeset
160 typedef std::vector<FuncDeclaration*> FuncDeclVector;
fd7ad91fd713 [svn r120] ModuleInfo implementation is now almost complete.
lindquist
parents: 113
diff changeset
161 FuncDeclVector ctors;
fd7ad91fd713 [svn r120] ModuleInfo implementation is now almost complete.
lindquist
parents: 113
diff changeset
162 FuncDeclVector dtors;
fd7ad91fd713 [svn r120] ModuleInfo implementation is now almost complete.
lindquist
parents: 113
diff changeset
163 FuncDeclVector unitTests;
232
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
164
092468448d25 [svn r248] Fixed: labels in inline asm block now work for the normal case.
lindquist
parents: 213
diff changeset
165 // for inline asm
233
76ee1bbe487e [svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
lindquist
parents: 232
diff changeset
166 IRAsmBlock* asmBlock;
250
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 233
diff changeset
167
252
e3355ce5444b [svn r269] Fixed dwarf debug info for structs.
lindquist
parents: 250
diff changeset
168 // dwarf dbg stuff
e3355ce5444b [svn r269] Fixed dwarf debug info for structs.
lindquist
parents: 250
diff changeset
169 // 'used' array solely for keeping a reference to globals
250
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 233
diff changeset
170 std::vector<LLConstant*> usedArray;
252
e3355ce5444b [svn r269] Fixed dwarf debug info for structs.
lindquist
parents: 250
diff changeset
171 LLGlobalVariable* dwarfCUs;
e3355ce5444b [svn r269] Fixed dwarf debug info for structs.
lindquist
parents: 250
diff changeset
172 LLGlobalVariable* dwarfSPs;
e3355ce5444b [svn r269] Fixed dwarf debug info for structs.
lindquist
parents: 250
diff changeset
173 LLGlobalVariable* dwarfGVs;
1
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
174 };
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
175
c53b6e3fe49a [svn r5] Initial commit. Most things are very rough.
lindquist
parents:
diff changeset
176 #endif // LLVMDC_GEN_IRSTATE_H