comparison dmd/LabelStatement.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
36 super(loc); 36 super(loc);
37 this.ident = ident; 37 this.ident = ident;
38 this.statement = statement; 38 this.statement = statement;
39 } 39 }
40 40
41 Statement syntaxCopy() 41 override Statement syntaxCopy()
42 { 42 {
43 LabelStatement s = new LabelStatement(loc, ident, statement.syntaxCopy()); 43 LabelStatement s = new LabelStatement(loc, ident, statement.syntaxCopy());
44 return s; 44 return s;
45 } 45 }
46 46
47 Statement semantic(Scope sc) 47 override Statement semantic(Scope sc)
48 { 48 {
49 LabelDsymbol ls; 49 LabelDsymbol ls;
50 FuncDeclaration fd = sc.parent.isFuncDeclaration(); 50 FuncDeclaration fd = sc.parent.isFuncDeclaration();
51 51
52 //printf("LabelStatement.semantic()\n"); 52 //printf("LabelStatement.semantic()\n");
64 statement = statement.semantic(sc); 64 statement = statement.semantic(sc);
65 sc.pop(); 65 sc.pop();
66 return this; 66 return this;
67 } 67 }
68 68
69 Statements flatten(Scope sc) 69 override Statements flatten(Scope sc)
70 { 70 {
71 Statements a = null; 71 Statements a = null;
72 72
73 if (statement) 73 if (statement)
74 { 74 {
86 } 86 }
87 87
88 return a; 88 return a;
89 } 89 }
90 90
91 bool usesEH() 91 override bool usesEH()
92 { 92 {
93 return statement ? statement.usesEH() : false; 93 return statement ? statement.usesEH() : false;
94 } 94 }
95 95
96 BE blockExit() 96 override BE blockExit()
97 { 97 {
98 //printf("LabelStatement.blockExit(%p)\n", this); 98 //printf("LabelStatement.blockExit(%p)\n", this);
99 return statement ? statement.blockExit() : BE.BEfallthru; 99 return statement ? statement.blockExit() : BE.BEfallthru;
100 } 100 }
101 101
102 bool comeFrom() 102 override bool comeFrom()
103 { 103 {
104 //printf("LabelStatement.comeFrom()\n"); 104 //printf("LabelStatement.comeFrom()\n");
105 return true; 105 return true;
106 } 106 }
107 107
108 Expression interpret(InterState istate) 108 override Expression interpret(InterState istate)
109 { 109 {
110 assert(false); 110 assert(false);
111 } 111 }
112 112
113 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 113 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
114 { 114 {
115 buf.writestring(ident.toChars()); 115 buf.writestring(ident.toChars());
116 buf.writebyte(':'); 116 buf.writebyte(':');
117 buf.writenl(); 117 buf.writenl();
118 if (statement) 118 if (statement)
119 statement.toCBuffer(buf, hgs); 119 statement.toCBuffer(buf, hgs);
120 } 120 }
121 121
122 Statement inlineScan(InlineScanState* iss) 122 override Statement inlineScan(InlineScanState* iss)
123 { 123 {
124 if (statement) 124 if (statement)
125 statement = statement.inlineScan(iss); 125 statement = statement.inlineScan(iss);
126 return this; 126 return this;
127 } 127 }
128 128
129 void toIR(IRState* irs) 129 override void toIR(IRState* irs)
130 { 130 {
131 //printf("LabelStatement.toIR() %p, statement = %p\n", this, statement); 131 //printf("LabelStatement.toIR() %p, statement = %p\n", this, statement);
132 Blockx* blx = irs.blx; 132 Blockx* blx = irs.blx;
133 block* bc = blx.curblock; 133 block* bc = blx.curblock;
134 IRState mystate = IRState(irs,this); 134 IRState mystate = IRState(irs,this);