cvsuser 04/12/15 04:52:39
Modified: classes default.pmc parrotclass.pmc
ops object.ops
Log:
stub in object vtables - add_parent
Revision Changes Path
1.107 +15 -1 parrot/classes/default.pmc
Index: default.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/default.pmc,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- default.pmc 13 Dec 2004 13:45:59 -0000 1.106
+++ default.pmc 15 Dec 2004 12:52:38 -0000 1.107
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: default.pmc,v 1.106 2004/12/13 13:45:59 leo Exp $
+$Id: default.pmc,v 1.107 2004/12/15 12:52:38 leo Exp $
=head1 NAME
@@ -811,6 +811,20 @@
/*
+=item C<void add_parent(PMC *parent)>
+
+Add class C<parent> to the list of our parents.
+
+=cut
+
+*/
+
+ void add_parent(PMC *parent) {
+ Parrot_add_parent(interpreter, SELF, parent);
+ }
+
+/*
+
=item C<void visit(visit_info *info)>
Used by DOD to mark the PMC.
1.31 +13 -1 parrot/classes/parrotclass.pmc
Index: parrotclass.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/parrotclass.pmc,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- parrotclass.pmc 11 Nov 2004 13:26:29 -0000 1.30
+++ parrotclass.pmc 15 Dec 2004 12:52:38 -0000 1.31
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: parrotclass.pmc,v 1.30 2004/11/11 13:26:29 leo Exp $
+$Id: parrotclass.pmc,v 1.31 2004/12/15 12:52:38 leo Exp $
=head1 NAME
@@ -120,6 +120,11 @@
Return SELF.
+=item C<STRING* namespace_name()>
+
+Return the name of the namespace, which is the classname of ParrotClass
+classes.
+
=cut
*/
@@ -132,6 +137,13 @@
return SELF;
}
+ STRING* namespace_name() {
+ PMC **class_data;
+ class_data = (PMC **)PMC_data(SELF);
+
+ return VTABLE_get_string(INTERP, class_data[PCD_CLASS_NAME]);
+ }
+
/*
=item C<void visit(visit_info *info)>
1.53 +1 -1 parrot/ops/object.ops
Index: object.ops
===================================================================
RCS file: /cvs/public/parrot/ops/object.ops,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- object.ops 14 Dec 2004 09:06:24 -0000 1.52
+++ object.ops 15 Dec 2004 12:52:39 -0000 1.53
@@ -344,7 +344,7 @@
=cut
inline op addparent(in PMC, in PMC) :object_classes {
- Parrot_add_parent(interpreter, $1, $2);
+ VTABLE_add_parent(interpreter, $1, $2);
goto NEXT();
}