comparison dmd/InterfaceDeclaration.d @ 130:60bb0fe4563e

dmdfe 2.037 first main iteration
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Thu, 09 Sep 2010 22:51:44 +0100
parents 767a01c2a272
children d8565fbd755c
comparison
equal deleted inserted replaced
129:010eb8f0e18d 130:60bb0fe4563e
6 import dmd.DsymbolTable; 6 import dmd.DsymbolTable;
7 import dmd.STC; 7 import dmd.STC;
8 import dmd.Type; 8 import dmd.Type;
9 import dmd.TY; 9 import dmd.TY;
10 import dmd.LINK; 10 import dmd.LINK;
11 import dmd.Argument; 11 import dmd.Parameter;
12 import dmd.Util; 12 import dmd.Util;
13 import dmd.TypeTuple; 13 import dmd.TypeTuple;
14 import dmd.PROT; 14 import dmd.PROT;
15 import dmd.TypeClass; 15 import dmd.TypeClass;
16 import dmd.Identifier; 16 import dmd.Identifier;
110 110
111 if (tb.ty == TY.Ttuple) 111 if (tb.ty == TY.Ttuple)
112 { TypeTuple tup = cast(TypeTuple)tb; 112 { TypeTuple tup = cast(TypeTuple)tb;
113 PROT protection = b.protection; 113 PROT protection = b.protection;
114 baseclasses.remove(i); 114 baseclasses.remove(i);
115 size_t dim = Argument.dim(tup.arguments); 115 size_t dim = Parameter.dim(tup.arguments);
116 for (size_t j = 0; j < dim; j++) 116 for (size_t j = 0; j < dim; j++)
117 { Argument arg = Argument.getNth(tup.arguments, j); 117 { auto arg = Parameter.getNth(tup.arguments, j);
118 b = new BaseClass(arg.type, protection); 118 b = new BaseClass(arg.type, protection);
119 baseclasses.insert(i + j, b); 119 baseclasses.insert(i + j, b);
120 } 120 }
121 } 121 }
122 else 122 else
201 BaseClass b = interfaces[i]; 201 BaseClass b = interfaces[i];
202 202
203 // Skip if b has already appeared 203 // Skip if b has already appeared
204 for (int k = 0; k < i; k++) 204 for (int k = 0; k < i; k++)
205 { 205 {
206 if (b == interfaces[i]) 206 if (b == interfaces[k])
207 goto Lcontinue; 207 goto Lcontinue;
208 } 208 }
209 209
210 // Copy vtbl[] from base class 210 // Copy vtbl[] from base class
211 if (b.base.vtblOffset()) 211 if (b.base.vtblOffset())
405 OffsetTypeInfo[] offTi; 405 OffsetTypeInfo[] offTi;
406 void *defaultConstructor; 406 void *defaultConstructor;
407 #if DMDV2 407 #if DMDV2
408 const(MemberInfo[]) function(string) xgetMembers; // module getMembers() function 408 const(MemberInfo[]) function(string) xgetMembers; // module getMembers() function
409 #endif 409 #endif
410 TypeInfo typeinfo; 410 //TypeInfo typeinfo;
411 } 411 }
412 */ 412 */
413 dt_t *dt = null; 413 dt_t *dt = null;
414 414
415 if (classinfo) 415 if (classinfo)
470 version (DMDV2) { 470 version (DMDV2) {
471 // xgetMembers 471 // xgetMembers
472 dtdword(&dt, 0); 472 dtdword(&dt, 0);
473 } 473 }
474 474
475 dtxoff(&dt, type.vtinfo.toSymbol(), 0, TYnptr); // typeinfo 475 //dtxoff(&dt, type.vtinfo.toSymbol(), 0, TYnptr); // typeinfo
476 476
477 ////////////////////////////////////////////// 477 //////////////////////////////////////////////
478 478
479 // Put out vtblInterfaces.data[]. Must immediately follow csym, because 479 // Put out vtblInterfaces.data[]. Must immediately follow csym, because
480 // of the fixup (*) 480 // of the fixup (*)