mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-17 03:40:05 +02:00
[svn r357] Merged DMD 1.033
This commit is contained in:
@@ -73,6 +73,7 @@ enum STC
|
||||
STCnothrow = 0x2000000, // never throws exceptions
|
||||
STCpure = 0x4000000, // pure function
|
||||
STCtls = 0x8000000, // thread local
|
||||
STCalias = 0x10000000, // alias parameter
|
||||
};
|
||||
|
||||
struct Match
|
||||
@@ -101,7 +102,7 @@ struct Declaration : Dsymbol
|
||||
|
||||
Declaration(Identifier *id);
|
||||
void semantic(Scope *sc);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
unsigned size(Loc loc);
|
||||
void checkModify(Loc loc, Scope *sc, Type *t);
|
||||
|
||||
@@ -150,7 +151,7 @@ struct TupleDeclaration : Declaration
|
||||
|
||||
TupleDeclaration(Loc loc, Identifier *ident, Objects *objects);
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
Type *getType();
|
||||
int needThis();
|
||||
|
||||
@@ -174,7 +175,7 @@ struct TypedefDeclaration : Declaration
|
||||
void semantic(Scope *sc);
|
||||
void semantic2(Scope *sc);
|
||||
char *mangle();
|
||||
char *kind();
|
||||
const char *kind();
|
||||
Type *getType();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
#ifdef _DH
|
||||
@@ -184,7 +185,7 @@ struct TypedefDeclaration : Declaration
|
||||
|
||||
void toDocBuffer(OutBuffer *buf);
|
||||
|
||||
void toObjFile(); // compile to .obj file
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
void toDebug();
|
||||
int cvMember(unsigned char *p);
|
||||
|
||||
@@ -207,7 +208,7 @@ struct AliasDeclaration : Declaration
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
int overloadInsert(Dsymbol *s);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
Type *getType();
|
||||
Dsymbol *toAlias();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
@@ -242,7 +243,7 @@ struct VarDeclaration : Declaration
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
void semantic2(Scope *sc);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
#ifdef _DH
|
||||
Type *htype;
|
||||
@@ -259,7 +260,7 @@ struct VarDeclaration : Declaration
|
||||
Dsymbol *toAlias();
|
||||
|
||||
Symbol *toSymbol();
|
||||
void toObjFile(); // compile to .obj file
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
int cvMember(unsigned char *p);
|
||||
|
||||
// Eliminate need for dynamic_cast
|
||||
@@ -325,7 +326,7 @@ struct TypeInfoDeclaration : VarDeclaration
|
||||
void emitComment(Scope *sc);
|
||||
|
||||
Symbol *toSymbol();
|
||||
void toObjFile(); // compile to .obj file
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
virtual void toDt(dt_t **pdt);
|
||||
|
||||
virtual TypeInfoDeclaration* isTypeInfoDeclaration() { return this; }
|
||||
@@ -467,6 +468,32 @@ struct TypeInfoTupleDeclaration : TypeInfoDeclaration
|
||||
void llvmDefine();
|
||||
};
|
||||
|
||||
#if DMDV2
|
||||
struct TypeInfoConstDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoConstDeclaration(Type *tinfo);
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
|
||||
struct TypeInfoInvariantDeclaration : TypeInfoDeclaration
|
||||
{
|
||||
TypeInfoInvariantDeclaration(Type *tinfo);
|
||||
|
||||
void toDt(dt_t **pdt);
|
||||
|
||||
// LLVMDC
|
||||
void llvmDeclare();
|
||||
void llvmDefine();
|
||||
};
|
||||
#endif
|
||||
|
||||
/**************************************************************/
|
||||
|
||||
struct ThisDeclaration : VarDeclaration
|
||||
{
|
||||
ThisDeclaration(Type *t);
|
||||
@@ -481,8 +508,7 @@ enum ILS
|
||||
};
|
||||
|
||||
/**************************************************************/
|
||||
|
||||
#if V2
|
||||
#if DMDV2
|
||||
|
||||
enum BUILTIN
|
||||
{
|
||||
@@ -548,7 +574,7 @@ struct FuncDeclaration : Declaration
|
||||
VarDeclaration *nrvo_var; // variable to replace with shidden
|
||||
Symbol *shidden; // hidden pointer passed to function
|
||||
|
||||
#if V2
|
||||
#if DMDV2
|
||||
enum BUILTIN builtin; // set if this is a known, builtin
|
||||
// function we can evaluate at compile
|
||||
// time
|
||||
@@ -597,7 +623,7 @@ struct FuncDeclaration : Declaration
|
||||
void inlineScan();
|
||||
int canInline(int hasthis, int hdrscan = 0);
|
||||
Expression *doInline(InlineScanState *iss, Expression *ethis, Array *arguments);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
void toDocBuffer(OutBuffer *buf);
|
||||
|
||||
static FuncDeclaration *genCfunc(Type *treturn, char *name);
|
||||
@@ -605,7 +631,7 @@ struct FuncDeclaration : Declaration
|
||||
|
||||
Symbol *toSymbol();
|
||||
Symbol *toThunkSymbol(int offset); // thunk version
|
||||
void toObjFile(); // compile to .obj file
|
||||
void toObjFile(int multiobj); // compile to .obj file
|
||||
int cvMember(unsigned char *p);
|
||||
|
||||
FuncDeclaration *isFuncDeclaration() { return this; }
|
||||
@@ -627,7 +653,7 @@ struct FuncAliasDeclaration : FuncDeclaration
|
||||
FuncAliasDeclaration(FuncDeclaration *funcalias);
|
||||
|
||||
FuncAliasDeclaration *isFuncAliasDeclaration() { return this; }
|
||||
char *kind();
|
||||
const char *kind();
|
||||
Symbol *toSymbol();
|
||||
};
|
||||
|
||||
@@ -640,9 +666,10 @@ struct FuncLiteralDeclaration : FuncDeclaration
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
int isNested();
|
||||
int isVirtual();
|
||||
|
||||
FuncLiteralDeclaration *isFuncLiteralDeclaration() { return this; }
|
||||
char *kind();
|
||||
const char *kind();
|
||||
};
|
||||
|
||||
struct CtorDeclaration : FuncDeclaration
|
||||
@@ -653,7 +680,7 @@ struct CtorDeclaration : FuncDeclaration
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
char *toChars();
|
||||
int isVirtual();
|
||||
int addPreInvariant();
|
||||
@@ -663,6 +690,24 @@ struct CtorDeclaration : FuncDeclaration
|
||||
CtorDeclaration *isCtorDeclaration() { return this; }
|
||||
};
|
||||
|
||||
#if DMDV2
|
||||
struct PostBlitDeclaration : FuncDeclaration
|
||||
{
|
||||
PostBlitDeclaration(Loc loc, Loc endloc);
|
||||
PostBlitDeclaration(Loc loc, Loc endloc, Identifier *id);
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
int isVirtual();
|
||||
int addPreInvariant();
|
||||
int addPostInvariant();
|
||||
int overloadInsert(Dsymbol *s);
|
||||
void emitComment(Scope *sc);
|
||||
|
||||
PostBlitDeclaration *isPostBlitDeclaration() { return this; }
|
||||
};
|
||||
#endif
|
||||
|
||||
struct DtorDeclaration : FuncDeclaration
|
||||
{
|
||||
DtorDeclaration(Loc loc, Loc endloc);
|
||||
@@ -696,7 +741,8 @@ struct StaticCtorDeclaration : FuncDeclaration
|
||||
};
|
||||
|
||||
struct StaticDtorDeclaration : FuncDeclaration
|
||||
{
|
||||
{ VarDeclaration *vgate; // 'gate' variable
|
||||
|
||||
StaticDtorDeclaration(Loc loc, Loc endloc);
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
@@ -748,7 +794,7 @@ struct NewDeclaration : FuncDeclaration
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
int isVirtual();
|
||||
int addPreInvariant();
|
||||
int addPostInvariant();
|
||||
@@ -764,7 +810,7 @@ struct DeleteDeclaration : FuncDeclaration
|
||||
Dsymbol *syntaxCopy(Dsymbol *);
|
||||
void semantic(Scope *sc);
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
char *kind();
|
||||
const char *kind();
|
||||
int isDelete();
|
||||
int isVirtual();
|
||||
int addPreInvariant();
|
||||
|
||||
Reference in New Issue
Block a user