comparison dmd/DotVarExp.d @ 72:2e2a5c3f943a

reduced warnings by adding override to the methods think this also normalizes different line endings used all over the place
author Trass3r
date Sat, 28 Aug 2010 16:19:48 +0200
parents cab4c37afb89
children ef02e2e203c2
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
49 //printf("DotVarExp()\n"); 49 //printf("DotVarExp()\n");
50 this.var = var; 50 this.var = var;
51 this.hasOverloads = hasOverloads; 51 this.hasOverloads = hasOverloads;
52 } 52 }
53 53
54 Expression semantic(Scope sc) 54 override Expression semantic(Scope sc)
55 { 55 {
56 version (LOGSEMANTIC) { 56 version (LOGSEMANTIC) {
57 printf("DotVarExp.semantic('%s')\n", toChars()); 57 printf("DotVarExp.semantic('%s')\n", toChars());
58 } 58 }
59 if (!type) 59 if (!type)
124 } 124 }
125 //printf("-DotVarExp.semantic('%s')\n", toChars()); 125 //printf("-DotVarExp.semantic('%s')\n", toChars());
126 return this; 126 return this;
127 } 127 }
128 128
129 int isLvalue() 129 override int isLvalue()
130 { 130 {
131 return 1; 131 return 1;
132 } 132 }
133 133
134 Expression toLvalue(Scope sc, Expression e) 134 override Expression toLvalue(Scope sc, Expression e)
135 { 135 {
136 //printf("DotVarExp::toLvalue(%s)\n", toChars()); 136 //printf("DotVarExp::toLvalue(%s)\n", toChars());
137 return this; 137 return this;
138 } 138 }
139 139
140 Expression modifiableLvalue(Scope sc, Expression e) 140 override Expression modifiableLvalue(Scope sc, Expression e)
141 { 141 {
142 static if (false) { 142 static if (false) {
143 printf("DotVarExp::modifiableLvalue(%s)\n", toChars()); 143 printf("DotVarExp::modifiableLvalue(%s)\n", toChars());
144 printf("e1.type = %s\n", e1.type.toChars()); 144 printf("e1.type = %s\n", e1.type.toChars());
145 printf("var.type = %s\n", var.type.toChars()); 145 printf("var.type = %s\n", var.type.toChars());
193 } 193 }
194 194
195 return this; 195 return this;
196 } 196 }
197 197
198 Expression optimize(int result) 198 override Expression optimize(int result)
199 { 199 {
200 //printf("DotVarExp.optimize(result = x%x) %s\n", result, toChars()); 200 //printf("DotVarExp.optimize(result = x%x) %s\n", result, toChars());
201 e1 = e1.optimize(result); 201 e1 = e1.optimize(result);
202 202
203 if (e1.op == TOK.TOKvar) 203 if (e1.op == TOK.TOKvar)
230 } 230 }
231 231
232 return this; 232 return this;
233 } 233 }
234 234
235 Expression interpret(InterState istate) 235 override Expression interpret(InterState istate)
236 { 236 {
237 assert(false); 237 assert(false);
238 } 238 }
239 239
240 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 240 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
241 { 241 {
242 expToCBuffer(buf, hgs, e1, PREC.PREC_primary); 242 expToCBuffer(buf, hgs, e1, PREC.PREC_primary);
243 buf.writeByte('.'); 243 buf.writeByte('.');
244 buf.writestring(var.toChars()); 244 buf.writestring(var.toChars());
245 } 245 }
246 246
247 void dump(int indent) 247 override void dump(int indent)
248 { 248 {
249 assert(false); 249 assert(false);
250 } 250 }
251 251
252 elem* toElem(IRState* irs) 252 override elem* toElem(IRState* irs)
253 { 253 {
254 // *(&e + offset) 254 // *(&e + offset)
255 //printf("DotVarExp.toElem('%s')\n", toChars()); 255 //printf("DotVarExp.toElem('%s')\n", toChars());
256 256
257 VarDeclaration v = var.isVarDeclaration(); 257 VarDeclaration v = var.isVarDeclaration();