Mercurial > projects > ldc
diff gen/dvalue.h @ 1151:3cf0066e6faf
- Versioned Expresssion::toElem with #if IN_DMD/IN_LLVM.
- Eliminated the DLRValue DValue.
- Implemented proactive handling of l-value CastExpS.
- Minor tweak in runtime memory.d .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Sat, 28 Mar 2009 05:00:43 +0100 |
parents | 30b42a283c8e |
children | f5729209a1d4 |
line wrap: on
line diff
--- a/gen/dvalue.h Fri Mar 27 23:24:47 2009 +0100 +++ b/gen/dvalue.h Sat Mar 28 05:00:43 2009 +0100 @@ -29,7 +29,6 @@ struct DFieldValue; struct DFuncValue; struct DSliceValue; -struct DLRValue; // base class for d-values struct DValue : Object @@ -48,7 +47,6 @@ virtual DFieldValue* isField() { return NULL; } virtual DSliceValue* isSlice() { return NULL; } virtual DFuncValue* isFunc() { return NULL; } - virtual DLRValue* isLRValue() { return NULL; } protected: DValue() {} @@ -147,25 +145,4 @@ virtual DFuncValue* isFunc() { return this; } }; -// l-value and r-value pair d-value -struct DLRValue : DValue -{ - DValue* lvalue; - DValue* rvalue; - - DLRValue(DValue* lval, DValue* rval) { - lvalue = lval; - rvalue = rval; - } - - virtual bool isLVal() { return true; } - virtual LLValue* getLVal() { return lvalue->isLVal() ? lvalue->getLVal() : lvalue->getRVal(); } - virtual LLValue* getRVal() { return rvalue->getRVal(); } - - Type*& getLType(); - Type*& getRType() { return rvalue->getType(); } - virtual Type*& getType() { return getRType(); } - virtual DLRValue* isLRValue() { return this; } -}; - #endif // LDC_GEN_DVALUE_H