diff dmd/declaration.h @ 336:aaade6ded589 trunk

[svn r357] Merged DMD 1.033
author lindquist
date Sat, 12 Jul 2008 19:38:31 +0200
parents 2b72433d5c8c
children d8234836b40f
line wrap: on
line diff
--- a/dmd/declaration.h	Sat Jul 12 17:04:36 2008 +0200
+++ b/dmd/declaration.h	Sat Jul 12 19:38:31 2008 +0200
@@ -73,6 +73,7 @@
     STCnothrow	    = 0x2000000,	// never throws exceptions
     STCpure	    = 0x4000000,	// pure function
     STCtls	    = 0x8000000,	// thread local
+    STCalias	    = 0x10000000,	// alias parameter
 };
 
 struct Match
@@ -101,7 +102,7 @@
 
     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 @@
 
     TupleDeclaration(Loc loc, Identifier *ident, Objects *objects);
     Dsymbol *syntaxCopy(Dsymbol *);
-    char *kind();
+    const char *kind();
     Type *getType();
     int needThis();
 
@@ -174,7 +175,7 @@
     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 @@
 
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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 @@
 };
 
 /**************************************************************/
-
-#if V2
+#if DMDV2
 
 enum BUILTIN
 {
@@ -548,7 +574,7 @@
     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 @@
     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 @@
 
     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 @@
     FuncAliasDeclaration(FuncDeclaration *funcalias);
 
     FuncAliasDeclaration *isFuncAliasDeclaration() { return this; }
-    char *kind();
+    const char *kind();
     Symbol *toSymbol();
 };
 
@@ -640,9 +666,10 @@
     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 @@
     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 @@
     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 StaticDtorDeclaration : FuncDeclaration
-{
+{   VarDeclaration *vgate;	// 'gate' variable
+
     StaticDtorDeclaration(Loc loc, Loc endloc);
     Dsymbol *syntaxCopy(Dsymbol *);
     void semantic(Scope *sc);
@@ -748,7 +794,7 @@
     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 @@
     Dsymbol *syntaxCopy(Dsymbol *);
     void semantic(Scope *sc);
     void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
-    char *kind();
+    const char *kind();
     int isDelete();
     int isVirtual();
     int addPreInvariant();