[svn r77] Fixed foreach on slice.

Fixed some nested function problems when accessing outer function parameters.
Major changes to handling of structs.
Initial support for unions.
Probably more...
This commit is contained in:
Tomas Lindquist Olsen
2007-10-31 03:11:32 +01:00
parent 4230f2ef11
commit 9804fe0fa3
23 changed files with 562 additions and 283 deletions
+5 -2
View File
@@ -19,6 +19,8 @@
#include "dsymbol.h"
#include <vector>
#include <set>
#include <map>
struct Identifier;
struct Type;
@@ -101,7 +103,8 @@ struct AggregateDeclaration : ScopeDsymbol
llvm::Constant* llvmVtbl;
llvm::ConstantStruct* llvmConstVtbl;
llvm::Constant* llvmInitZ;
virtual void offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result); // converts a DMD field offsets to LLVM struct index vector
bool llvmHasUnions;
virtual size_t offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result); // converts a DMD field offsets to LLVM struct index vector
AggregateDeclaration *isAggregateDeclaration() { return this; }
};
@@ -237,7 +240,7 @@ struct ClassDeclaration : AggregateDeclaration
Symbol *vtblsym;
virtual void offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result);
virtual size_t offsetToIndex(Type* t, unsigned os, std::vector<unsigned>& result);
ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
};