comparison ast/Decl.d @ 170:09150374ddf9

added a __vptr to all classes.
author Anders Johnsen <skabet@gmail.com>
date Thu, 24 Jul 2008 12:18:58 +0200
parents 362265427838
children 01c2c49775ef
comparison
equal deleted inserted replaced
169:b4aab11a02df 170:09150374ddf9
242 { 242 {
243 this(Identifier identifier) 243 this(Identifier identifier)
244 { 244 {
245 super(DeclType.ClassDecl); 245 super(DeclType.ClassDecl);
246 this.identifier = identifier; 246 this.identifier = identifier;
247
248 auto name = new Identifier(identifier.loc, "__vptr");
249 auto type = new Identifier(identifier.loc, "int");
250 auto p_type = new PointerIdentifier(type);
251 decls ~= new VarDecl(p_type, name, null);
247 } 252 }
248 253
249 void addMember(Decl decl) 254 void addMember(Decl decl)
250 { 255 {
251 decls ~= decl; 256 decls ~= decl;