Mercurial > projects > ldc
comparison gen/dvalue.h @ 435:74101be2a553
Added type param to DVarValue as DMD sometimes overrides the type of the VarDeclaration.
Added support for align(1)/packed structs, other alignments are still ignored.
Fixed some problems with accessing lazy arguments.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 30 Jul 2008 10:12:55 +0200 |
parents | 932229a851a4 |
children | 45a67b6f1310 |
comparison
equal
deleted
inserted
replaced
433:b5f55f471e0b | 435:74101be2a553 |
---|---|
109 VarDeclaration* var; | 109 VarDeclaration* var; |
110 LLValue* val; | 110 LLValue* val; |
111 LLValue* rval; | 111 LLValue* rval; |
112 bool lval; | 112 bool lval; |
113 | 113 |
114 DVarValue(VarDeclaration* vd, LLValue* llvmValue, bool lvalue); | 114 DVarValue(Type* t, VarDeclaration* vd, LLValue* llvmValue, bool lvalue); |
115 DVarValue(Type* vd, LLValue* lv, LLValue* rv); | 115 DVarValue(Type* t, LLValue* lv, LLValue* rv); |
116 DVarValue(Type* t, LLValue* llvmValue, bool lvalue); | 116 DVarValue(Type* t, LLValue* llvmValue, bool lvalue); |
117 | 117 |
118 virtual bool isLVal() { return val && lval; } | 118 virtual bool isLVal() { return val && lval; } |
119 virtual LLValue* getLVal(); | 119 virtual LLValue* getLVal(); |
120 virtual LLValue* getRVal(); | 120 virtual LLValue* getRVal(); |
131 }; | 131 }; |
132 | 132 |
133 // this d-value | 133 // this d-value |
134 struct DThisValue : DVarValue | 134 struct DThisValue : DVarValue |
135 { | 135 { |
136 DThisValue(VarDeclaration* vd, LLValue* llvmValue) : DVarValue(vd, llvmValue, true) {} | 136 DThisValue(Type* t, VarDeclaration* vd, LLValue* llvmValue) : DVarValue(t, vd, llvmValue, true) {} |
137 virtual DThisValue* isThis() { return this; } | 137 virtual DThisValue* isThis() { return this; } |
138 }; | 138 }; |
139 | 139 |
140 // slice d-value | 140 // slice d-value |
141 struct DSliceValue : DValue | 141 struct DSliceValue : DValue |