DMD 2.032 Merge.

This commit is contained in:
Robert Clipsham
2009-09-08 10:07:56 +01:00
parent 8b6f11938a
commit 089e792258
38 changed files with 1732 additions and 586 deletions
+17 -2
View File
@@ -261,7 +261,11 @@ struct VarDeclaration : Declaration
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 @@ struct VarDeclaration : Declaration
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 @@ struct VarDeclaration : Declaration
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 @@ enum BUILTIN
Expression *eval_builtin(enum BUILTIN builtin, Expressions *arguments);
#else
enum BUILTIN { };
#endif
struct FuncDeclaration : Declaration
@@ -718,6 +731,7 @@ struct FuncDeclaration : Declaration
void appendExp(Expression *e);
void appendState(Statement *s);
char *mangle();
const char *toPrettyChars();
int isMain();
int isWinMain();
int isDllMain();
@@ -734,7 +748,7 @@ struct FuncDeclaration : Declaration
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 @@ struct FuncDeclaration : Declaration
#endif
};
#if DMDV2
FuncDeclaration *resolveFuncCall(Scope *sc, Loc loc, Dsymbol *s,
Objects *tiargs,
Expression *ethis,
Expressions *arguments,
int flags);
#endif
struct FuncAliasDeclaration : FuncDeclaration
{