Merged dmd 2.059beta

This commit is contained in:
Alexey Prokhin
2012-04-05 11:47:00 +04:00
77 changed files with 6909 additions and 2243 deletions

View File

@@ -237,7 +237,7 @@ struct Type : Object
virtual Type *syntaxCopy();
int equals(Object *o);
int dyncast() { return DYNCAST_TYPE; } // kludge for template.isType()
int covariant(Type *t);
int covariant(Type *t, StorageClass *pstc = NULL);
char *toChars();
static char needThisPrefix();
#if IN_LLVM
@@ -294,7 +294,7 @@ struct Type : Object
Type *addSTC(StorageClass stc);
Type *castMod(unsigned mod);
Type *addMod(unsigned mod);
Type *addStorageClass(StorageClass stc);
virtual Type *addStorageClass(StorageClass stc);
Type *pointerTo();
Type *referenceTo();
Type *arrayOf();
@@ -320,7 +320,8 @@ struct Type : Object
Expression *noMember(Scope *sc, Expression *e, Identifier *ident);
virtual unsigned memalign(unsigned salign);
virtual Expression *defaultInit(Loc loc = 0);
virtual Expression *defaultInitLiteral(Loc loc = 0);
virtual Expression *defaultInitLiteral(Loc loc);
virtual Expression *voidInitLiteral(VarDeclaration *var);
virtual int isZeroInit(Loc loc = 0); // if initializer is 0
#if IN_DMD
virtual dt_t **toDt(dt_t **pdt);
@@ -332,7 +333,7 @@ struct Type : Object
Expression *getTypeInfo(Scope *sc);
virtual TypeInfoDeclaration *getTypeInfoDeclaration();
virtual int builtinTypeInfo();
virtual Type *reliesOnTident();
virtual Type *reliesOnTident(TemplateParameters *tparams = NULL);
virtual int hasWild();
virtual Expression *toExpression();
virtual int hasPointers();
@@ -383,7 +384,7 @@ struct TypeNext : Type
TypeNext(TY ty, Type *next);
void toDecoBuffer(OutBuffer *buf, int flag, bool mangle);
void checkDeprecated(Loc loc, Scope *sc);
Type *reliesOnTident();
Type *reliesOnTident(TemplateParameters *tparams = NULL);
int hasWild();
Type *nextOf();
Type *makeConst();
@@ -448,6 +449,7 @@ struct TypeVector : Type
char *toChars();
void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
void toDecoBuffer(OutBuffer *buf, int flag, bool mangle);
MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes, unsigned *wildmatch = NULL);
#if CPP_MANGLE
void toCppMangle(OutBuffer *buf, CppMangleState *cms);
#endif
@@ -491,6 +493,7 @@ struct TypeSArray : TypeArray
MATCH implicitConvTo(Type *to);
Expression *defaultInit(Loc loc);
Expression *defaultInitLiteral(Loc loc);
Expression *voidInitLiteral(VarDeclaration *var);
#if IN_DMD
dt_t **toDt(dt_t **pdt);
dt_t **toDtElem(dt_t **pdt, Expression *e);
@@ -519,6 +522,7 @@ struct TypeDArray : TypeArray
d_uns64 size(Loc loc);
unsigned alignsize();
Type *semantic(Loc loc, Scope *sc);
void resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps);
void toDecoBuffer(OutBuffer *buf, int flag, bool mangle);
void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
Expression *dotExp(Scope *sc, Expression *e, Identifier *ident);
@@ -563,6 +567,7 @@ struct TypeAArray : TypeArray
int isZeroInit(Loc loc);
int checkBoolean();
TypeInfoDeclaration *getTypeInfoDeclaration();
Expression *toExpression();
int hasPointers();
TypeTuple *toArgTypes();
MATCH implicitConvTo(Type *to);
@@ -656,6 +661,7 @@ struct TypeFunction : TypeNext
enum LINK linkage; // calling convention
enum TRUST trust; // level of trust
enum PURE purity; // PURExxxx
bool iswild; // is inout function
Expressions *fargs; // function arguments
int inuse;
@@ -671,12 +677,13 @@ struct TypeFunction : TypeNext
void attributesToCBuffer(OutBuffer *buf, int mod);
MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes, unsigned *wildmatch = NULL);
TypeInfoDeclaration *getTypeInfoDeclaration();
Type *reliesOnTident();
Type *reliesOnTident(TemplateParameters *tparams = NULL);
bool hasLazyParameters();
#if CPP_MANGLE
void toCppMangle(OutBuffer *buf, CppMangleState *cms);
#endif
bool parameterEscapes(Parameter *p);
Type *addStorageClass(StorageClass stc);
int callMatch(Expression *ethis, Expressions *toargs, int flag = 0);
#if IN_DMD
@@ -753,7 +760,7 @@ struct TypeIdentifier : TypeQualified
Dsymbol *toDsymbol(Scope *sc);
Type *semantic(Loc loc, Scope *sc);
MATCH deduceType(Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes, unsigned *wildmatch = NULL);
Type *reliesOnTident();
Type *reliesOnTident(TemplateParameters *tparams = NULL);
Expression *toExpression();
};
@@ -813,6 +820,7 @@ struct TypeStruct : Type
unsigned memalign(unsigned salign);
Expression *defaultInit(Loc loc);
Expression *defaultInitLiteral(Loc loc);
Expression *voidInitLiteral(VarDeclaration *var);
int isZeroInit(Loc loc);
int isAssignable();
int checkBoolean();
@@ -986,10 +994,11 @@ struct TypeTuple : Type
Type *syntaxCopy();
Type *semantic(Loc loc, Scope *sc);
int equals(Object *o);
Type *reliesOnTident();
Type *reliesOnTident(TemplateParameters *tparams = NULL);
void toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod);
void toDecoBuffer(OutBuffer *buf, int flag, bool mangle);
Expression *getProperty(Loc loc, Identifier *ident);
Expression *defaultInit(Loc loc);
TypeInfoDeclaration *getTypeInfoDeclaration();
};
@@ -1054,6 +1063,7 @@ struct Parameter : Object
extern int PTRSIZE;
extern int REALSIZE;
extern int REALPAD;
extern int REALALIGNSIZE;
extern int Tsize_t;
extern int Tptrdiff_t;