Merge branch 'dmd-2.060' into master.

Conflicts:
	dmd2/func.c
	dmd2/mars.c
This commit is contained in:
David Nadlinger
2012-09-07 04:15:44 +02:00
143 changed files with 18692 additions and 18365 deletions

View File

@@ -101,6 +101,12 @@ enum PURE;
#define STCdisable 0x2000000000LL // for functions that are not callable
#define STCresult 0x4000000000LL // for result variables passed to out contracts
#define STCnodefaultctor 0x8000000000LL // must be set inside constructor
#define STCtemp 0x10000000000LL // temporary variable introduced by inlining
// and used only in backend process, so it's rvalue
#ifdef BUG6652
#define STCbug6652 0x800000000000LL //
#endif
struct Match
{
@@ -136,7 +142,7 @@ struct Declaration : Dsymbol
enum LINK linkage;
int inuse; // used to detect cycles
#if IN_GCC
#ifdef IN_GCC
Expressions *attributes; // GCC decl/type attributes
#endif
@@ -148,6 +154,8 @@ struct Declaration : Dsymbol
unsigned size(Loc loc);
void checkModify(Loc loc, Scope *sc, Type *t);
Dsymbol *search(Loc loc, Identifier *ident, int flags);
void emitComment(Scope *sc);
void toJsonBuffer(OutBuffer *buf);
void toDocBuffer(OutBuffer *buf);
@@ -288,7 +296,7 @@ struct VarDeclaration : Declaration
#else
int nestedref; // referenced by a lexically nested function
#endif
unsigned short alignment;
structalign_t alignment;
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
@@ -710,7 +718,7 @@ enum BUILTIN
BUILTINbsr, // core.bitop.bsr
BUILTINbsf, // core.bitop.bsf
BUILTINbswap, // core.bitop.bswap
#if IN_GCC
#ifdef IN_GCC
BUILTINgcc, // GCC builtin
#endif
};
@@ -738,12 +746,14 @@ struct FuncDeclaration : Declaration
Identifier *outId; // identifier for out statement
VarDeclaration *vresult; // variable corresponding to outId
LabelDsymbol *returnLabel; // where the return goes
Scope *scout; // out contract scope for vresult->semantic
DsymbolTable *localsymtab; // used to prevent symbols in different
// scopes from having the same name
VarDeclaration *vthis; // 'this' parameter (member and nested)
VarDeclaration *v_arguments; // '_arguments' parameter
#if IN_GCC
#ifdef IN_GCC
VarDeclaration *v_arguments_var; // '_arguments' variable
VarDeclaration *v_argptr; // '_argptr' variable
#endif
VarDeclaration *v_argsave; // save area for args passed in registers for variadic functions
@@ -861,6 +871,7 @@ struct FuncDeclaration : Declaration
void checkNestedReference(Scope *sc, Loc loc);
int needsClosure();
int hasNestedFrameRefs();
void buildResultVar();
Statement *mergeFrequire(Statement *, Expressions *params = 0);
Statement *mergeFensure(Statement *, Expressions *params = 0);
Parameters *getParameters(int *pvarargs);
@@ -941,6 +952,7 @@ struct FuncAliasDeclaration : FuncDeclaration
struct FuncLiteralDeclaration : FuncDeclaration
{
enum TOK tok; // TOKfunction or TOKdelegate
Type *treq; // target of return type inference
FuncLiteralDeclaration(Loc loc, Loc endloc, Type *type, enum TOK tok,
ForeachStatement *fes);