comparison dmd/declaration.h @ 100:5071469303d4 trunk

[svn r104] TONS OF FIXES. Split up declaration, constant initializer gen and definition for globals, structs, classes and functions. Improved ClassInfo support (not complete), not in vtable yet. Fixed a bunch of forward reference problems. Much more. Major commit! :)
author lindquist
date Fri, 16 Nov 2007 08:21:47 +0100
parents 70d6113eeb8c
children 5b5194b25f33
comparison
equal deleted inserted replaced
99:a676a7743642 100:5071469303d4
22 #include "mtype.h" 22 #include "mtype.h"
23 23
24 namespace llvm { 24 namespace llvm {
25 class Value; 25 class Value;
26 } 26 }
27 struct IRFunction;
28 struct IRGlobal;
27 29
28 struct Expression; 30 struct Expression;
29 struct Statement; 31 struct Statement;
30 struct LabelDsymbol; 32 struct LabelDsymbol;
31 struct Initializer; 33 struct Initializer;
126 enum PROT prot(); 128 enum PROT prot();
127 129
128 Declaration *isDeclaration() { return this; } 130 Declaration *isDeclaration() { return this; }
129 131
130 virtual void toObjFile(); // compile to .obj file 132 virtual void toObjFile(); // compile to .obj file
131
132 bool llvmTouched;
133 }; 133 };
134 134
135 /**************************************************************/ 135 /**************************************************************/
136 136
137 struct TupleDeclaration : Declaration 137 struct TupleDeclaration : Declaration
261 // LLVMDC 261 // LLVMDC
262 int llvmNestedIndex; 262 int llvmNestedIndex;
263 int llvmFieldIndex; 263 int llvmFieldIndex;
264 size_t llvmFieldIndexOffset; 264 size_t llvmFieldIndexOffset;
265 bool llvmNeedsStorage; 265 bool llvmNeedsStorage;
266 llvm::Constant* llvmConstInit;
267 IRGlobal* llvmIRGlobal;
266 }; 268 };
267 269
268 /**************************************************************/ 270 /**************************************************************/
269 271
270 // This is a shell around a back end symbol 272 // This is a shell around a back end symbol
291 void semantic(Scope *sc); 293 void semantic(Scope *sc);
292 294
293 void emitComment(Scope *sc); 295 void emitComment(Scope *sc);
294 296
295 Symbol *toSymbol(); 297 Symbol *toSymbol();
298
299 ClassInfoDeclaration* isClassInfoDeclaration() { return this; }
296 }; 300 };
297 301
298 struct ModuleInfoDeclaration : VarDeclaration 302 struct ModuleInfoDeclaration : VarDeclaration
299 { 303 {
300 Module *mod; 304 Module *mod;
556 llvm::Value* llvmNested; 560 llvm::Value* llvmNested;
557 llvm::Value* llvmArguments; 561 llvm::Value* llvmArguments;
558 llvm::Value* llvmArgPtr; 562 llvm::Value* llvmArgPtr;
559 llvm::Constant* llvmDwarfSubProgram; 563 llvm::Constant* llvmDwarfSubProgram;
560 bool llvmRunTimeHack; 564 bool llvmRunTimeHack;
565 IRFunction* llvmIRFunc;
561 }; 566 };
562 567
563 struct FuncAliasDeclaration : FuncDeclaration 568 struct FuncAliasDeclaration : FuncDeclaration
564 { 569 {
565 FuncDeclaration *funcalias; 570 FuncDeclaration *funcalias;