Mercurial > projects > ldc
diff dmd2/declaration.h @ 1577:e4f7b5d9c68a
DMD 2.032 Merge.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Tue, 08 Sep 2009 10:07:56 +0100 |
parents | 54b3c1394d62 |
children |
line wrap: on
line diff
--- a/dmd2/declaration.h Tue Aug 25 21:35:43 2009 +0200 +++ b/dmd2/declaration.h Tue Sep 08 10:07:56 2009 +0100 @@ -261,7 +261,11 @@ Initializer *init; unsigned offset; int noauto; // no auto semantics +#if DMDV2 FuncDeclarations nestedrefs; // referenced by these lexically nested functions +#else + int nestedref; // referenced by a lexically nested function +#endif 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 @@ -269,6 +273,11 @@ Dsymbol *aliassym; // if redone as alias to another symbol Expression *value; // when interpreting, this is the value // (NULL if value not determinable) +#if DMDV2 + VarDeclaration *rundtor; // if !NULL, rundtor is tested at runtime to see + // if the destructor should be run. Used to prevent + // dtor calls on postblitted vars +#endif VarDeclaration(Loc loc, Type *t, Identifier *id, Initializer *init); Dsymbol *syntaxCopy(Dsymbol *); @@ -285,8 +294,10 @@ int isDataseg(); int isThreadlocal(); int hasPointers(); +#if DMDV2 int canTakeAddressOf(); int needsAutoDtor(); +#endif Expression *callAutoDtor(Scope *sc); ExpInitializer *getExpInitializer(); Expression *getConstInitializer(); @@ -625,6 +636,8 @@ Expression *eval_builtin(enum BUILTIN builtin, Expressions *arguments); +#else +enum BUILTIN { }; #endif struct FuncDeclaration : Declaration @@ -718,6 +731,7 @@ void appendExp(Expression *e); void appendState(Statement *s); char *mangle(); + const char *toPrettyChars(); int isMain(); int isWinMain(); int isDllMain(); @@ -734,7 +748,7 @@ virtual int isFinal(); virtual int addPreInvariant(); virtual int addPostInvariant(); - Expression *interpret(InterState *istate, Expressions *arguments); + Expression *interpret(InterState *istate, Expressions *arguments, Expression *thisexp = NULL); void inlineScan(); int canInline(int hasthis, int hdrscan = 0); Expression *doInline(InlineScanState *iss, Expression *ethis, Array *arguments); @@ -788,12 +802,13 @@ #endif }; +#if DMDV2 FuncDeclaration *resolveFuncCall(Scope *sc, Loc loc, Dsymbol *s, Objects *tiargs, Expression *ethis, Expressions *arguments, int flags); - +#endif struct FuncAliasDeclaration : FuncDeclaration {