cvsuser     04/02/24 12:17:33

  Modified:    docs/pdds pdd15_objects.pod
               include/parrot objects.h
               src      objects.c
  Log:
  Changed definitions of fully qualified attribute name
  
  Changed some op parameter formats, though the opcode files don't
  reflect the changes yet.
  
  Started adding in code to make attribute construction much easier.
  
  Revision  Changes    Path
  1.24      +19 -11    parrot/docs/pdds/pdd15_objects.pod
  
  Index: pdd15_objects.pod
  ===================================================================
  RCS file: /cvs/public/parrot/docs/pdds/pdd15_objects.pod,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -r1.23 -r1.24
  --- pdd15_objects.pod 24 Feb 2004 15:07:13 -0000      1.23
  +++ pdd15_objects.pod 24 Feb 2004 20:17:19 -0000      1.24
  @@ -251,9 +251,13 @@
   =item 4
   
   The class attribute name hash. Keys are the fully qualified attribute
  -names (in whatever format the language governing the class wants) and
  -the values are the offset from the beginning of the attribute array of
  -the particular attribute.
  +names and the values are the offset from the beginning of the
  +attribute array of the particular attribute.
  +
  +=item 5
  +
  +The class attribute array. This is an array of unqualified attribute
  +names.
   
   =back
   
  @@ -330,7 +334,7 @@
   
   =item callmethod Sz
   
  -Call a method. If the method name is provided, we find the PMC for the named
  +call a method. If the method name is provided, we find the PMC for the named
   method and put it in the sub/method slot. If no name is provided we
   assume that all the calling conventions have already been set up and
   the method PMC is already in the proper place.
  @@ -371,16 +375,16 @@
   which aren't parent classes of what remains of Px's parent list are
   removed, as are their attributes.
   
  -=item addattribute Px, Sy, Sz
  +=item addattribute Px, Sy
   
  -Add attribute Sy, with a fully-qualified name Sz, to class Px. This
  -will add the attribute slot to all objects of class Px and children of
  -class Px, with a default value of C<Null>.
  +Add attribute Sy to class Px. This will add the attribute slot to all
  +objects of class Px and children of class Px, with a default value of
  +C<Null>.
   
  -=item removeattribute Px, Sy, Sz
  +=item removeattribute Px, Sy
   
  -Remove the attribute Sy (fully qualified name Sz) from class Px, all
  -objects of class Px, and all objects of a child of class Px.
  +Remove the attribute Sy from class Px, all objects of class Px, and
  +all objects of a child of class Px.
   
   =item instantiate Px, Py, Sz
   
  @@ -556,6 +560,10 @@
   embedded in it. Most OO languages don't allow attribute changes to
   existing classes, though parrot's base attribute system does allow
   this.
  +
  +The fully qualified name of an attribute is the classname, a null, and
  +the attribute name. Parrot synthesizes the fully-qualified name where
  +it needs to.
   
   =item Method
   
  
  
  
  1.14      +2 -1      parrot/include/parrot/objects.h
  
  Index: objects.h
  ===================================================================
  RCS file: /cvs/public/parrot/include/parrot/objects.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -r1.13 -r1.14
  --- objects.h 24 Feb 2004 15:07:16 -0000      1.13
  +++ objects.h 24 Feb 2004 20:17:24 -0000      1.14
  @@ -1,7 +1,7 @@
   /* objects.h
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: objects.h,v 1.13 2004/02/24 15:07:16 dan Exp $
  + *     $Id: objects.h,v 1.14 2004/02/24 20:17:24 dan Exp $
    *  Overview:
    *     Parrot class and object header stuff
    *  Data Structure and Algorithms:
  @@ -24,6 +24,7 @@
       PCD_ALL_PARENTS,    /* array in search order */
       PCD_ATTRIB_OFFS,    /* class => offset hash */
       PCD_ATTRIBUTES,      /* class::attrib => offset hash */
  +    PCD_CLASS_ATTRIBUTES, /* Class attribute array */
       PCD_MAX
   } PARROT_CLASS_DATA_ENUM;
   
  
  
  
  1.36      +5 -2      parrot/src/objects.c
  
  Index: objects.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/objects.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -w -r1.35 -r1.36
  --- objects.c 24 Feb 2004 18:02:06 -0000      1.35
  +++ objects.c 24 Feb 2004 20:17:33 -0000      1.36
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: objects.c,v 1.35 2004/02/24 18:02:06 dan Exp $
  +$Id: objects.c,v 1.36 2004/02/24 20:17:33 dan Exp $
   
   =head1 NAME
   
  @@ -178,6 +178,9 @@
               pmc_new(interpreter, enum_class_OrderedHash));
       VTABLE_set_pmc_keyed_int(interpreter, class_array, PCD_ATTRIBUTES,
               pmc_new(interpreter, enum_class_OrderedHash));
  +    VTABLE_set_pmc_keyed_int(interpreter, class_array, PCD_CLASS_ATTRIBUTES,
  +            pmc_new(interpreter, enum_class_Array));
  +                             
   
       /* Set the classname, if we have one */
       classname_pmc = pmc_new(interpreter, enum_class_PerlString);
  @@ -319,7 +322,7 @@
               class_name);
   
       /* Note the number of used slots */
  -    object->cache.int_val = POD_FIRST_ATTRIB;
  +    object->cache.int_val = POD_FIRST_ATTRIB + attrib_count;
   
       PMC_data(object) = new_object_array;
       PObj_flag_SET(is_PMC_ptr, object);
  
  
  

Reply via email to