mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-06-02 15:06:00 +02:00
Merged DMD 2.060 frontend.
Upstream Git tag v2.060 (e8fe11c20249cb9e42538be88c99b74ede4d12e3).
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "intrange.h"
|
||||
|
||||
struct Type;
|
||||
struct TypeVector;
|
||||
struct Scope;
|
||||
struct TupleDeclaration;
|
||||
struct VarDeclaration;
|
||||
@@ -183,6 +184,11 @@ struct Expression : Object
|
||||
// Same as WANTvalue, but also expand variables as far as possible
|
||||
#define WANTexpand 8
|
||||
|
||||
// Entry point for CTFE.
|
||||
// A compile-time result is required. Give an error if not possible
|
||||
Expression *ctfeInterpret();
|
||||
|
||||
// Implementation of CTFE for this expression
|
||||
virtual Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue);
|
||||
|
||||
virtual int isConst();
|
||||
@@ -432,7 +438,6 @@ struct StringExp : Expression
|
||||
StringExp(Loc loc, void *s, size_t len, unsigned char postfix);
|
||||
//Expression *syntaxCopy();
|
||||
int equals(Object *o);
|
||||
char *toChars();
|
||||
Expression *semantic(Scope *sc);
|
||||
Expression *interpret(InterState *istate, CtfeGoal goal = ctfeNeedRvalue);
|
||||
size_t length();
|
||||
@@ -793,7 +798,6 @@ struct FuncExp : Expression
|
||||
FuncLiteralDeclaration *fd;
|
||||
TemplateDeclaration *td;
|
||||
enum TOK tok;
|
||||
Type *treq;
|
||||
|
||||
FuncExp(Loc loc, FuncLiteralDeclaration *fd, TemplateDeclaration *td = NULL);
|
||||
Expression *syntaxCopy();
|
||||
@@ -947,10 +951,11 @@ struct BinExp : Expression
|
||||
Expression *interpretCommon(InterState *istate, CtfeGoal goal,
|
||||
Expression *(*fp)(Type *, Expression *, Expression *));
|
||||
Expression *interpretCommon2(InterState *istate, CtfeGoal goal,
|
||||
Expression *(*fp)(TOK, Type *, Expression *, Expression *));
|
||||
Expression *(*fp)(Loc, TOK, Type *, Expression *, Expression *));
|
||||
Expression *interpretAssignCommon(InterState *istate, CtfeGoal goal,
|
||||
Expression *(*fp)(Type *, Expression *, Expression *), int post = 0);
|
||||
Expression *arrayOp(Scope *sc);
|
||||
Expression *interpretFourPointerRelation(InterState *istate, CtfeGoal goal);
|
||||
virtual Expression *arrayOp(Scope *sc);
|
||||
|
||||
Expression *doInline(InlineDoState *ids);
|
||||
Expression *inlineScan(InlineScanState *iss);
|
||||
@@ -971,6 +976,7 @@ struct BinAssignExp : BinExp
|
||||
}
|
||||
|
||||
Expression *semantic(Scope *sc);
|
||||
Expression *arrayOp(Scope *sc);
|
||||
|
||||
Expression *op_overload(Scope *sc);
|
||||
|
||||
@@ -1330,7 +1336,7 @@ struct CastExp : UnaExp
|
||||
|
||||
struct VectorExp : UnaExp
|
||||
{
|
||||
Type *to;
|
||||
TypeVector *to; // the target vector type before semantic()
|
||||
unsigned dim; // number of elements in the vector
|
||||
|
||||
VectorExp(Loc loc, Expression *e, Type *t);
|
||||
@@ -1339,6 +1345,7 @@ struct VectorExp : UnaExp
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
#if IN_DMD
|
||||
elem *toElem(IRState *irs);
|
||||
dt_t **toDt(dt_t **pdt);
|
||||
#endif
|
||||
#if IN_LLVM
|
||||
DValue* toElem(IRState* irs);
|
||||
@@ -2154,5 +2161,8 @@ void sliceAssignArrayLiteralFromString(ArrayLiteralExp *existingAE, StringExp *n
|
||||
void sliceAssignStringFromArrayLiteral(StringExp *existingSE, ArrayLiteralExp *newae, int firstIndex);
|
||||
void sliceAssignStringFromString(StringExp *existingSE, StringExp *newstr, int firstIndex);
|
||||
|
||||
int sliceCmpStringWithString(StringExp *se1, StringExp *se2, size_t lo1, size_t lo2, size_t len);
|
||||
int sliceCmpStringWithArray(StringExp *se1, ArrayLiteralExp *ae2, size_t lo1, size_t lo2, size_t len);
|
||||
|
||||
|
||||
#endif /* DMD_EXPRESSION_H */
|
||||
|
||||
Reference in New Issue
Block a user