Mercurial > projects > ddmd
comparison dmd/AddrExp.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 | 10317f0c89a5 |
children | ad4792a1cfd6 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
36 this(Loc loc, Expression e) | 36 this(Loc loc, Expression e) |
37 { | 37 { |
38 super(loc, TOK.TOKaddress, AddrExp.sizeof, e); | 38 super(loc, TOK.TOKaddress, AddrExp.sizeof, e); |
39 } | 39 } |
40 | 40 |
41 Expression semantic(Scope sc) | 41 override Expression semantic(Scope sc) |
42 { | 42 { |
43 version (LOGSEMANTIC) { | 43 version (LOGSEMANTIC) { |
44 printf("AddrExp.semantic('%s')\n", toChars()); | 44 printf("AddrExp.semantic('%s')\n", toChars()); |
45 } | 45 } |
46 if (!type) | 46 if (!type) |
124 return optimize(WANTvalue); | 124 return optimize(WANTvalue); |
125 } | 125 } |
126 return this; | 126 return this; |
127 } | 127 } |
128 | 128 |
129 elem* toElem(IRState* irs) | 129 override elem* toElem(IRState* irs) |
130 { | 130 { |
131 elem* e; | 131 elem* e; |
132 | 132 |
133 //printf("AddrExp.toElem('%s')\n", toChars()); | 133 //printf("AddrExp.toElem('%s')\n", toChars()); |
134 | 134 |
138 e.Ety = type.totym(); | 138 e.Ety = type.totym(); |
139 el_setLoc(e,loc); | 139 el_setLoc(e,loc); |
140 return e; | 140 return e; |
141 } | 141 } |
142 | 142 |
143 MATCH implicitConvTo(Type t) | 143 override MATCH implicitConvTo(Type t) |
144 { | 144 { |
145 static if (false) { | 145 static if (false) { |
146 printf("AddrExp.implicitConvTo(this=%s, type=%s, t=%s)\n", | 146 printf("AddrExp.implicitConvTo(this=%s, type=%s, t=%s)\n", |
147 toChars(), type.toChars(), t.toChars()); | 147 toChars(), type.toChars(), t.toChars()); |
148 } | 148 } |
199 | 199 |
200 //printf("\tresult = %d\n", result); | 200 //printf("\tresult = %d\n", result); |
201 return result; | 201 return result; |
202 } | 202 } |
203 | 203 |
204 Expression castTo(Scope sc, Type t) | 204 override Expression castTo(Scope sc, Type t) |
205 { | 205 { |
206 Type tb; | 206 Type tb; |
207 | 207 |
208 static if (false) { | 208 static if (false) { |
209 printf("AddrExp.castTo(this=%s, type=%s, t=%s)\n", toChars(), type.toChars(), t.toChars()); | 209 printf("AddrExp.castTo(this=%s, type=%s, t=%s)\n", toChars(), type.toChars(), t.toChars()); |
272 } | 272 } |
273 e.type = t; | 273 e.type = t; |
274 return e; | 274 return e; |
275 } | 275 } |
276 | 276 |
277 Expression optimize(int result) | 277 override Expression optimize(int result) |
278 { | 278 { |
279 Expression e; | 279 Expression e; |
280 | 280 |
281 //printf("AddrExp.optimize(result = %d) %s\n", result, toChars()); | 281 //printf("AddrExp.optimize(result = %d) %s\n", result, toChars()); |
282 | 282 |