comparison dmd/GotoStatement.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 e28b18c23469
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
32 { 32 {
33 super(loc); 33 super(loc);
34 this.ident = ident; 34 this.ident = ident;
35 } 35 }
36 36
37 Statement syntaxCopy() 37 override Statement syntaxCopy()
38 { 38 {
39 GotoStatement s = new GotoStatement(loc, ident); 39 GotoStatement s = new GotoStatement(loc, ident);
40 return s; 40 return s;
41 } 41 }
42 42
43 Statement semantic(Scope sc) 43 override Statement semantic(Scope sc)
44 { 44 {
45 FuncDeclaration fd = sc.parent.isFuncDeclaration(); 45 FuncDeclaration fd = sc.parent.isFuncDeclaration();
46 46
47 //printf("GotoStatement.semantic()\n"); 47 //printf("GotoStatement.semantic()\n");
48 tf = sc.tf; 48 tf = sc.tf;
67 if (label.statement && label.statement.tf != sc.tf) 67 if (label.statement && label.statement.tf != sc.tf)
68 error("cannot goto in or out of finally block"); 68 error("cannot goto in or out of finally block");
69 return this; 69 return this;
70 } 70 }
71 71
72 BE blockExit() 72 override BE blockExit()
73 { 73 {
74 //printf("GotoStatement.blockExit(%p)\n", this); 74 //printf("GotoStatement.blockExit(%p)\n", this);
75 return BE.BEgoto; 75 return BE.BEgoto;
76 } 76 }
77 77
78 Expression interpret(InterState istate) 78 override Expression interpret(InterState istate)
79 { 79 {
80 assert(false); 80 assert(false);
81 } 81 }
82 82
83 void toIR(IRState* irs) 83 override void toIR(IRState* irs)
84 { 84 {
85 block* b; 85 block* b;
86 block* bdest; 86 block* bdest;
87 Blockx* blx = irs.blx; 87 Blockx* blx = irs.blx;
88 88
119 119
120 list_append(&b.Bsucc,bdest); 120 list_append(&b.Bsucc,bdest);
121 block_next(blx,BCgoto,null); 121 block_next(blx,BCgoto,null);
122 } 122 }
123 123
124 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 124 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
125 { 125 {
126 buf.writestring("goto "); 126 buf.writestring("goto ");
127 buf.writestring(ident.toChars()); 127 buf.writestring(ident.toChars());
128 buf.writebyte(';'); 128 buf.writebyte(';');
129 buf.writenl(); 129 buf.writenl();
130 } 130 }
131 131
132 GotoStatement isGotoStatement() { return this; } 132 override GotoStatement isGotoStatement() { return this; }
133 } 133 }