comparison dmd/PtrExp.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
42 { 42 {
43 super(loc, TOKstar, PtrExp.sizeof, e); 43 super(loc, TOKstar, PtrExp.sizeof, e);
44 type = t; 44 type = t;
45 } 45 }
46 46
47 Expression semantic(Scope sc) 47 override Expression semantic(Scope sc)
48 { 48 {
49 version (LOGSEMANTIC) { 49 version (LOGSEMANTIC) {
50 printf("PtrExp::semantic('%s')\n", toChars()); 50 printf("PtrExp::semantic('%s')\n", toChars());
51 } 51 }
52 if (!type) 52 if (!type)
78 rvalue(); 78 rvalue();
79 } 79 }
80 return this; 80 return this;
81 } 81 }
82 82
83 int isLvalue() 83 override int isLvalue()
84 { 84 {
85 return 1; 85 return 1;
86 } 86 }
87 87
88 Expression toLvalue(Scope sc, Expression e) 88 override Expression toLvalue(Scope sc, Expression e)
89 { 89 {
90 static if (false) { 90 static if (false) {
91 tym = tybasic(e1.ET.Tty); 91 tym = tybasic(e1.ET.Tty);
92 if (!(tyscalar(tym) || 92 if (!(tyscalar(tym) ||
93 tym == TYstruct || 93 tym == TYstruct ||
97 } 97 }
98 return this; 98 return this;
99 } 99 }
100 100
101 version (DMDV2) { 101 version (DMDV2) {
102 Expression modifiableLvalue(Scope sc, Expression e) 102 override Expression modifiableLvalue(Scope sc, Expression e)
103 { 103 {
104 //printf("PtrExp.modifiableLvalue() %s, type %s\n", toChars(), type.toChars()); 104 //printf("PtrExp.modifiableLvalue() %s, type %s\n", toChars(), type.toChars());
105 105
106 if (e1.op == TOKsymoff) 106 if (e1.op == TOKsymoff)
107 { 107 {
111 } 111 }
112 112
113 return Expression.modifiableLvalue(sc, e); 113 return Expression.modifiableLvalue(sc, e);
114 } 114 }
115 } 115 }
116 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 116 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
117 { 117 {
118 assert(false); 118 assert(false);
119 } 119 }
120 120
121 elem* toElem(IRState* irs) 121 override elem* toElem(IRState* irs)
122 { 122 {
123 elem* e; 123 elem* e;
124 124
125 //printf("PtrExp::toElem() %s\n", toChars()); 125 //printf("PtrExp::toElem() %s\n", toChars());
126 e = e1.toElem(irs); 126 e = e1.toElem(irs);
133 133
134 el_setLoc(e,loc); 134 el_setLoc(e,loc);
135 return e; 135 return e;
136 } 136 }
137 137
138 Expression optimize(int result) 138 override Expression optimize(int result)
139 { 139 {
140 //printf("PtrExp.optimize(result = x%x) %s\n", result, toChars()); 140 //printf("PtrExp.optimize(result = x%x) %s\n", result, toChars());
141 e1 = e1.optimize(result); 141 e1 = e1.optimize(result);
142 // Convert *&ex to ex 142 // Convert *&ex to ex
143 if (e1.op == TOK.TOKaddress) 143 if (e1.op == TOK.TOKaddress)
178 } 178 }
179 } 179 }
180 return this; 180 return this;
181 } 181 }
182 182
183 Expression interpret(InterState istate) 183 override Expression interpret(InterState istate)
184 { 184 {
185 assert(false); 185 assert(false);
186 } 186 }
187 187
188 Identifier opId() 188 override Identifier opId()
189 { 189 {
190 assert(false); 190 assert(false);
191 } 191 }
192 } 192 }
193 193