changeset 170:09150374ddf9

added a __vptr to all classes.
author Anders Johnsen <skabet@gmail.com>
date Thu, 24 Jul 2008 12:18:58 +0200
parents b4aab11a02df
children f0385c044065
files ast/Decl.d
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ast/Decl.d	Thu Jul 24 12:07:11 2008 +0200
+++ b/ast/Decl.d	Thu Jul 24 12:18:58 2008 +0200
@@ -244,6 +244,11 @@
     {
         super(DeclType.ClassDecl);
         this.identifier = identifier;
+        
+        auto name = new Identifier(identifier.loc, "__vptr");
+        auto type = new Identifier(identifier.loc, "int");
+        auto p_type = new PointerIdentifier(type);
+        decls ~= new VarDecl(p_type, name, null);
     }
 
     void addMember(Decl decl)