comparison dmd/TypeFunction.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 fd4acc376c45
children ef02e2e203c2
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
60 this.parameters = parameters; 60 this.parameters = parameters;
61 this.varargs = varargs; 61 this.varargs = varargs;
62 this.linkage = linkage; 62 this.linkage = linkage;
63 } 63 }
64 64
65 Type syntaxCopy() 65 override Type syntaxCopy()
66 { 66 {
67 Type treturn = next ? next.syntaxCopy() : null; 67 Type treturn = next ? next.syntaxCopy() : null;
68 Arguments params = Argument.arraySyntaxCopy(parameters); 68 Arguments params = Argument.arraySyntaxCopy(parameters);
69 TypeFunction t = new TypeFunction(params, treturn, varargs, linkage); 69 TypeFunction t = new TypeFunction(params, treturn, varargs, linkage);
70 t.mod = mod; 70 t.mod = mod;
111 { 111 {
112 assert(this.classinfo == TypeFunction.classinfo); 112 assert(this.classinfo == TypeFunction.classinfo);
113 return cloneTo(new TypeFunction(null, next, varargs, linkage)); 113 return cloneTo(new TypeFunction(null, next, varargs, linkage));
114 } 114 }
115 } 115 }
116 Type semantic(Loc loc, Scope sc) 116 override Type semantic(Loc loc, Scope sc)
117 { 117 {
118 if (deco) // if semantic() already run 118 if (deco) // if semantic() already run
119 { 119 {
120 //printf("already done\n"); 120 //printf("already done\n");
121 return this; 121 return this;
220 * even though the types match 220 * even though the types match
221 */ 221 */
222 return tf; 222 return tf;
223 } 223 }
224 224
225 void toDecoBuffer(OutBuffer buf, int flag) 225 override void toDecoBuffer(OutBuffer buf, int flag)
226 { 226 {
227 ubyte mc; 227 ubyte mc;
228 228
229 //printf("TypeFunction.toDecoBuffer() this = %p %s\n", this, toChars()); 229 //printf("TypeFunction.toDecoBuffer() this = %p %s\n", this, toChars());
230 //static int nest; if (++nest == 50) *(char*)0=0; 230 //static int nest; if (++nest == 50) *(char*)0=0;
268 buf.writeByte('Z' - varargs); // mark end of arg list 268 buf.writeByte('Z' - varargs); // mark end of arg list
269 next.toDecoBuffer(buf); 269 next.toDecoBuffer(buf);
270 inuse--; 270 inuse--;
271 } 271 }
272 272
273 void toCBuffer(OutBuffer buf, Identifier ident, HdrGenState* hgs) 273 override void toCBuffer(OutBuffer buf, Identifier ident, HdrGenState* hgs)
274 { 274 {
275 //printf("TypeFunction.toCBuffer() this = %p\n", this); 275 //printf("TypeFunction.toCBuffer() this = %p\n", this);
276 string p = null; 276 string p = null;
277 277
278 if (inuse) 278 if (inuse)
325 } 325 }
326 Argument.argsToCBuffer(buf, hgs, parameters, varargs); 326 Argument.argsToCBuffer(buf, hgs, parameters, varargs);
327 inuse--; 327 inuse--;
328 } 328 }
329 329
330 void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) 330 override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod)
331 { 331 {
332 //printf("TypeFunction::toCBuffer2() this = %p, ref = %d\n", this, isref); 332 //printf("TypeFunction::toCBuffer2() this = %p, ref = %d\n", this, isref);
333 string p; 333 string p;
334 334
335 if (inuse) 335 if (inuse)
377 buf.writestring(" ref"); 377 buf.writestring(" ref");
378 378
379 inuse--; 379 inuse--;
380 } 380 }
381 381
382 MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) 382 override MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes)
383 { 383 {
384 assert(false); 384 assert(false);
385 } 385 }
386 386
387 TypeInfoDeclaration getTypeInfoDeclaration() 387 override TypeInfoDeclaration getTypeInfoDeclaration()
388 { 388 {
389 assert(false); 389 assert(false);
390 } 390 }
391 391
392 Type reliesOnTident() 392 override Type reliesOnTident()
393 { 393 {
394 if (parameters) 394 if (parameters)
395 { 395 {
396 for (size_t i = 0; i < parameters.dim; i++) 396 for (size_t i = 0; i < parameters.dim; i++)
397 { 397 {
593 Nomatch: 593 Nomatch:
594 //printf("no match\n"); 594 //printf("no match\n");
595 return MATCH.MATCHnomatch; 595 return MATCH.MATCHnomatch;
596 } 596 }
597 597
598 type* toCtype() 598 override type* toCtype()
599 { 599 {
600 if (ctype) { 600 if (ctype) {
601 return ctype; 601 return ctype;
602 } 602 }
603 603
688 } 688 }
689 else 689 else
690 return RET.RETregs; 690 return RET.RETregs;
691 } 691 }
692 692
693 TYM totym() 693 override TYM totym()
694 { 694 {
695 TYM tyf; 695 TYM tyf;
696 696
697 //printf("TypeFunction.totym(), linkage = %d\n", linkage); 697 //printf("TypeFunction.totym(), linkage = %d\n", linkage);
698 switch (linkage) 698 switch (linkage)