Mercurial > projects > ldc
diff dmd/declaration.h @ 1367:8026319762be
Merged DMD 1.045 !!!
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Sat, 16 May 2009 22:21:31 +0200 |
parents | 78038e540342 |
children | d9c5f5a43403 |
line wrap: on
line diff
--- a/dmd/declaration.h Sat May 16 18:37:16 2009 +0200 +++ b/dmd/declaration.h Sat May 16 22:21:31 2009 +0200 @@ -68,6 +68,7 @@ STCtemplateparameter = 0x40000, // template parameter STCscope = 0x80000, // template parameter STCinvariant = 0x100000, + STCimmutable = 0x100000, STCref = 0x200000, STCinit = 0x400000, // has explicit initializer STCmanifest = 0x800000, // manifest constant @@ -76,6 +77,10 @@ STCpure = 0x4000000, // pure function STCtls = 0x8000000, // thread local STCalias = 0x10000000, // alias parameter + STCshared = 0x20000000, // accessible from multiple threads + STCgshared = 0x40000000, // accessible from multiple threads + // but not typed as "shared" + STC_TYPECTOR = (STCconst | STCimmutable | STCshared), }; struct Match @@ -101,6 +106,7 @@ unsigned storage_class; enum PROT protection; enum LINK linkage; + int inuse; // used to detect cycles Declaration(Identifier *id); void semantic(Scope *sc); @@ -177,7 +183,6 @@ // 1: semantic() is in progress // 2: semantic() has been run // 3: semantic2() has been run - int inuse; // used to detect typedef cycles TypedefDeclaration(Loc loc, Identifier *ident, Type *basetype, Initializer *init); Dsymbol *syntaxCopy(Dsymbol *); @@ -249,7 +254,6 @@ unsigned offset; int noauto; // no auto semantics int nestedref; // referenced by a lexically nested function - int inuse; int ctorinit; // it has been initialized in a ctor int onstack; // 1: it has been allocated on the stack // 2: on stack, run destructor anyway @@ -257,6 +261,7 @@ Dsymbol *aliassym; // if redone as alias to another symbol Expression *value; // when interpreting, this is the value // (NULL if value not determinable) + Scope *scope; // !=NULL means context to use VarDeclaration(Loc loc, Type *t, Identifier *id, Initializer *init); Dsymbol *syntaxCopy(Dsymbol *); @@ -561,14 +566,22 @@ void llvmDefine(); #endif }; + +struct TypeInfoSharedDeclaration : TypeInfoDeclaration +{ + TypeInfoSharedDeclaration(Type *tinfo); + + void toDt(dt_t **pdt); +}; #endif /**************************************************************/ struct ThisDeclaration : VarDeclaration { - ThisDeclaration(Type *t); + ThisDeclaration(Loc loc, Type *t); Dsymbol *syntaxCopy(Dsymbol *); + ThisDeclaration *isThisDeclaration() { return this; } }; enum ILS @@ -624,7 +637,11 @@ ILS inlineStatus; int inlineNest; // !=0 if nested inline int cantInterpret; // !=0 if cannot interpret function - int semanticRun; // !=0 if semantic3() had been run + int semanticRun; // 1 semantic() run + // 2 semantic2() run + // 3 semantic3() started + // 4 semantic3() done + // 5 toObjFile() run // this function's frame ptr ForeachStatement *fes; // if foreach body, this is the foreach int introducing; // !=0 if 'introducing' function