Mercurial > projects > ddmd
comparison dmd/StructLiteralExp.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 | f708f0452e81 |
children | 43073c7c7769 |
comparison
equal
deleted
inserted
replaced
71:8e24ef1dd139 | 72:2e2a5c3f943a |
---|---|
56 this.sym = null; | 56 this.sym = null; |
57 this.soffset = 0; | 57 this.soffset = 0; |
58 this.fillHoles = 1; | 58 this.fillHoles = 1; |
59 } | 59 } |
60 | 60 |
61 Expression syntaxCopy() | 61 override Expression syntaxCopy() |
62 { | 62 { |
63 assert(false); | 63 assert(false); |
64 } | 64 } |
65 | 65 |
66 Expression semantic(Scope sc) | 66 override Expression semantic(Scope sc) |
67 { | 67 { |
68 Expression e; | 68 Expression e; |
69 int nfields = sd.fields.dim - sd.isnested; | 69 int nfields = sd.fields.dim - sd.isnested; |
70 | 70 |
71 version (LOGSEMANTIC) { | 71 version (LOGSEMANTIC) { |
164 int getFieldIndex(Type type, uint offset) | 164 int getFieldIndex(Type type, uint offset) |
165 { | 165 { |
166 assert(false); | 166 assert(false); |
167 } | 167 } |
168 | 168 |
169 elem* toElem(IRState* irs) | 169 override elem* toElem(IRState* irs) |
170 { | 170 { |
171 elem* e; | 171 elem* e; |
172 size_t dim; | 172 size_t dim; |
173 | 173 |
174 //printf("StructLiteralExp.toElem() %s\n", toChars()); | 174 //printf("StructLiteralExp.toElem() %s\n", toChars()); |
331 e = el_combine(e, ev); | 331 e = el_combine(e, ev); |
332 el_setLoc(e,loc); | 332 el_setLoc(e,loc); |
333 return e; | 333 return e; |
334 } | 334 } |
335 | 335 |
336 bool checkSideEffect(int flag) | 336 override bool checkSideEffect(int flag) |
337 { | 337 { |
338 assert(false); | 338 assert(false); |
339 } | 339 } |
340 | 340 |
341 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | 341 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
342 { | 342 { |
343 assert(false); | 343 assert(false); |
344 } | 344 } |
345 | 345 |
346 void toMangleBuffer(OutBuffer buf) | 346 override void toMangleBuffer(OutBuffer buf) |
347 { | 347 { |
348 assert(false); | 348 assert(false); |
349 } | 349 } |
350 | 350 |
351 void scanForNestedRef(Scope sc) | 351 override void scanForNestedRef(Scope sc) |
352 { | 352 { |
353 assert(false); | 353 assert(false); |
354 } | 354 } |
355 | 355 |
356 Expression optimize(int result) | 356 override Expression optimize(int result) |
357 { | 357 { |
358 if (elements) | 358 if (elements) |
359 { | 359 { |
360 for (size_t i = 0; i < elements.dim; i++) | 360 for (size_t i = 0; i < elements.dim; i++) |
361 { | 361 { |
367 } | 367 } |
368 } | 368 } |
369 return this; | 369 return this; |
370 } | 370 } |
371 | 371 |
372 Expression interpret(InterState istate) | 372 override Expression interpret(InterState istate) |
373 { | 373 { |
374 assert(false); | 374 assert(false); |
375 } | 375 } |
376 | 376 |
377 dt_t** toDt(dt_t** pdt) | 377 override dt_t** toDt(dt_t** pdt) |
378 { | 378 { |
379 assert(false); | 379 assert(false); |
380 } | 380 } |
381 | 381 |
382 int isLvalue() | 382 override int isLvalue() |
383 { | 383 { |
384 assert(false); | 384 assert(false); |
385 } | 385 } |
386 | 386 |
387 Expression toLvalue(Scope sc, Expression e) | 387 override Expression toLvalue(Scope sc, Expression e) |
388 { | 388 { |
389 assert(false); | 389 assert(false); |
390 } | 390 } |
391 | 391 |
392 bool canThrow() | 392 override bool canThrow() |
393 { | 393 { |
394 return arrayExpressionCanThrow(elements); | 394 return arrayExpressionCanThrow(elements); |
395 } | 395 } |
396 | 396 |
397 MATCH implicitConvTo(Type t) | 397 override MATCH implicitConvTo(Type t) |
398 { | 398 { |
399 static if (false) { | 399 static if (false) { |
400 printf("StructLiteralExp.implicitConvTo(this=%.*s, type=%.*s, t=%.*s)\n", | 400 printf("StructLiteralExp.implicitConvTo(this=%.*s, type=%.*s, t=%.*s)\n", |
401 toChars(), type.toChars(), t.toChars()); | 401 toChars(), type.toChars(), t.toChars()); |
402 } | 402 } |
424 } | 424 } |
425 } | 425 } |
426 return m; | 426 return m; |
427 } | 427 } |
428 | 428 |
429 int inlineCost(InlineCostState* ics) | 429 override int inlineCost(InlineCostState* ics) |
430 { | 430 { |
431 assert(false); | 431 assert(false); |
432 } | 432 } |
433 | 433 |
434 Expression doInline(InlineDoState ids) | 434 override Expression doInline(InlineDoState ids) |
435 { | 435 { |
436 assert(false); | 436 assert(false); |
437 } | 437 } |
438 | 438 |
439 Expression inlineScan(InlineScanState* iss) | 439 override Expression inlineScan(InlineScanState* iss) |
440 { | 440 { |
441 assert(false); | 441 assert(false); |
442 } | 442 } |
443 } | 443 } |
444 | 444 |