diff dmd2/expression.h @ 1526:54b3c1394d62

Merged dmdfe 2.031.
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 07 Jul 2009 02:26:11 +0100
parents 638d16625da2
children e4f7b5d9c68a
line wrap: on
line diff
--- a/dmd2/expression.h	Mon Jul 06 23:57:27 2009 +0100
+++ b/dmd2/expression.h	Tue Jul 07 02:26:11 2009 +0100
@@ -85,6 +85,11 @@
 Expression *fromConstInitializer(int result, Expression *e);
 int arrayExpressionCanThrow(Expressions *exps);
 
+struct IntRange
+{   uinteger_t imin;
+    uinteger_t imax;
+};
+
 struct Expression : Object
 {
     Loc loc;			// file location
@@ -122,6 +127,7 @@
     virtual Expression *modifiableLvalue(Scope *sc, Expression *e);
     virtual Expression *implicitCastTo(Scope *sc, Type *t);
     virtual MATCH implicitConvTo(Type *t);
+    virtual IntRange getIntRange();
     virtual Expression *castTo(Scope *sc, Type *t);
     virtual void checkEscape();
     void checkScalar();
@@ -191,6 +197,7 @@
     Expression *interpret(InterState *istate);
     char *toChars();
     void dump(int indent);
+    IntRange getIntRange();
     dinteger_t toInteger();
     real_t toReal();
     real_t toImaginary();
@@ -558,6 +565,7 @@
     TypeExp(Loc loc, Type *type);
     Expression *syntaxCopy();
     Expression *semantic(Scope *sc);
+    void rvalue();
     void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
     Expression *optimize(int result);
 #if IN_DMD
@@ -1230,6 +1238,8 @@
     CastExp(Loc loc, Expression *e, unsigned mod);
     Expression *syntaxCopy();
     Expression *semantic(Scope *sc);
+    MATCH implicitConvTo(Type *t);
+    IntRange getIntRange();
     Expression *optimize(int result);
     Expression *interpret(InterState *istate);
     int checkSideEffect(int flag);
@@ -1334,11 +1344,14 @@
     CommaExp(Loc loc, Expression *e1, Expression *e2);
     Expression *semantic(Scope *sc);
     void checkEscape();
+    IntRange getIntRange();
     int isLvalue();
     Expression *toLvalue(Scope *sc, Expression *e);
     Expression *modifiableLvalue(Scope *sc, Expression *e);
     int isBool(int result);
     int checkSideEffect(int flag);
+    MATCH implicitConvTo(Type *t);
+    Expression *castTo(Scope *sc, Type *t);
     Expression *optimize(int result);
     Expression *interpret(InterState *istate);
 #if IN_DMD
@@ -1552,6 +1565,7 @@
     Expression *interpret(InterState *istate);
     void buildArrayIdent(OutBuffer *buf, Expressions *arguments);
     Expression *buildArrayLoop(Arguments *fparams);
+    IntRange getIntRange();
 
     // For operator overloading
     Identifier *opId();
@@ -1594,6 +1608,7 @@
     Expression *semantic(Scope *sc);
     Expression *optimize(int result);
     Expression *interpret(InterState *istate);
+    IntRange getIntRange();
 
     // For operator overloading
     Identifier *opId();
@@ -1614,6 +1629,7 @@
     Expression *semantic(Scope *sc);
     Expression *optimize(int result);
     Expression *interpret(InterState *istate);
+    IntRange getIntRange();
 
     // For operator overloading
     Identifier *opId();
@@ -1634,6 +1650,7 @@
     Expression *semantic(Scope *sc);
     Expression *optimize(int result);
     Expression *interpret(InterState *istate);
+    IntRange getIntRange();
 
     // For operator overloading
     Identifier *opId();
@@ -1656,6 +1673,7 @@
     Expression *interpret(InterState *istate);
     void buildArrayIdent(OutBuffer *buf, Expressions *arguments);
     Expression *buildArrayLoop(Arguments *fparams);
+    IntRange getIntRange();
 
     // For operator overloading
     int isCommutative();
@@ -1679,6 +1697,8 @@
     Expression *interpret(InterState *istate);
     void buildArrayIdent(OutBuffer *buf, Expressions *arguments);
     Expression *buildArrayLoop(Arguments *fparams);
+    MATCH implicitConvTo(Type *t);
+    IntRange getIntRange();
 
     // For operator overloading
     int isCommutative();
@@ -1702,6 +1722,8 @@
     Expression *interpret(InterState *istate);
     void buildArrayIdent(OutBuffer *buf, Expressions *arguments);
     Expression *buildArrayLoop(Arguments *fparams);
+    MATCH implicitConvTo(Type *t);
+    IntRange getIntRange();
 
     // For operator overloading
     int isCommutative();