comparison dmd/NewExp.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 4290d870944a
children be2ab491772e
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
64 this.newargs = newargs; 64 this.newargs = newargs;
65 this.newtype = newtype; 65 this.newtype = newtype;
66 this.arguments = arguments; 66 this.arguments = arguments;
67 } 67 }
68 68
69 Expression syntaxCopy() 69 override Expression syntaxCopy()
70 { 70 {
71 return new NewExp(loc, 71 return new NewExp(loc,
72 thisexp ? thisexp.syntaxCopy() : null, 72 thisexp ? thisexp.syntaxCopy() : null,
73 arraySyntaxCopy(newargs), 73 arraySyntaxCopy(newargs),
74 newtype.syntaxCopy(), arraySyntaxCopy(arguments)); 74 newtype.syntaxCopy(), arraySyntaxCopy(arguments));
75 } 75 }
76 76
77 Expression semantic(Scope sc) 77 override Expression semantic(Scope sc)
78 { 78 {
79 int i; 79 int i;
80 Type tb; 80 Type tb;
81 ClassDeclaration cdthis = null; 81 ClassDeclaration cdthis = null;
82 82
374 //printf("NewExp:type '%s'\n", type.toChars()); 374 //printf("NewExp:type '%s'\n", type.toChars());
375 375
376 return this; 376 return this;
377 } 377 }
378 378
379 Expression optimize(int result) 379 override Expression optimize(int result)
380 { 380 {
381 if (thisexp) 381 if (thisexp)
382 thisexp = thisexp.optimize(WANTvalue); 382 thisexp = thisexp.optimize(WANTvalue);
383 383
384 // Optimize parameters 384 // Optimize parameters
404 } 404 }
405 } 405 }
406 return this; 406 return this;
407 } 407 }
408 408
409 elem* toElem(IRState* irs) 409 override elem* toElem(IRState* irs)
410 { 410 {
411 elem* e; 411 elem* e;
412 Type t; 412 Type t;
413 Type ectype; 413 Type ectype;
414 414
722 722
723 el_setLoc(e,loc); 723 el_setLoc(e,loc);
724 return e; 724 return e;
725 } 725 }
726 726
727 bool checkSideEffect(int flag) 727 override bool checkSideEffect(int flag)
728 { 728 {
729 assert(false); 729 assert(false);
730 } 730 }
731 731
732 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 732 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
733 { 733 {
734 assert(false); 734 assert(false);
735 } 735 }
736 736
737 void scanForNestedRef(Scope sc) 737 override void scanForNestedRef(Scope sc)
738 { 738 {
739 //printf("NewExp.scanForNestedRef(Scope *sc): %s\n", toChars()); 739 //printf("NewExp.scanForNestedRef(Scope *sc): %s\n", toChars());
740 740
741 if (thisexp) 741 if (thisexp)
742 thisexp.scanForNestedRef(sc); 742 thisexp.scanForNestedRef(sc);
743 arrayExpressionScanForNestedRef(sc, newargs); 743 arrayExpressionScanForNestedRef(sc, newargs);
744 arrayExpressionScanForNestedRef(sc, arguments); 744 arrayExpressionScanForNestedRef(sc, arguments);
745 } 745 }
746 746
747 version (DMDV2) { 747 version (DMDV2) {
748 bool canThrow() 748 override bool canThrow()
749 { 749 {
750 return 1; 750 return 1;
751 } 751 }
752 } 752 }
753 753
754 //int inlineCost(InlineCostState *ics); 754 //int inlineCost(InlineCostState *ics);
755 755
756 Expression doInline(InlineDoState ids) 756 override Expression doInline(InlineDoState ids)
757 { 757 {
758 //printf("NewExp.doInline(): %s\n", toChars()); 758 //printf("NewExp.doInline(): %s\n", toChars());
759 NewExp ne = cast(NewExp)copy(); 759 NewExp ne = cast(NewExp)copy();
760 760
761 if (thisexp) 761 if (thisexp)