[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! :)
This commit is contained in:
Tomas Lindquist Olsen
2007-11-16 08:21:47 +01:00
parent 7d6bbcd87d
commit d1cfe9524c
35 changed files with 1824 additions and 1452 deletions

View File

@@ -24,6 +24,8 @@
namespace llvm {
class Value;
}
struct IRFunction;
struct IRGlobal;
struct Expression;
struct Statement;
@@ -128,8 +130,6 @@ struct Declaration : Dsymbol
Declaration *isDeclaration() { return this; }
virtual void toObjFile(); // compile to .obj file
bool llvmTouched;
};
/**************************************************************/
@@ -263,6 +263,8 @@ struct VarDeclaration : Declaration
int llvmFieldIndex;
size_t llvmFieldIndexOffset;
bool llvmNeedsStorage;
llvm::Constant* llvmConstInit;
IRGlobal* llvmIRGlobal;
};
/**************************************************************/
@@ -293,6 +295,8 @@ struct ClassInfoDeclaration : VarDeclaration
void emitComment(Scope *sc);
Symbol *toSymbol();
ClassInfoDeclaration* isClassInfoDeclaration() { return this; }
};
struct ModuleInfoDeclaration : VarDeclaration
@@ -558,6 +562,7 @@ struct FuncDeclaration : Declaration
llvm::Value* llvmArgPtr;
llvm::Constant* llvmDwarfSubProgram;
bool llvmRunTimeHack;
IRFunction* llvmIRFunc;
};
struct FuncAliasDeclaration : FuncDeclaration