cvsuser     04/03/04 10:19:42

  Modified:    include/parrot objects.h
               src      objects.c
  Log:
  Incremental bits for vtable cache migration
  
  Revision  Changes    Path
  1.20      +2 -2      parrot/include/parrot/objects.h
  
  Index: objects.h
  ===================================================================
  RCS file: /cvs/public/parrot/include/parrot/objects.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -w -r1.19 -r1.20
  --- objects.h 4 Mar 2004 17:43:53 -0000       1.19
  +++ objects.h 4 Mar 2004 18:19:38 -0000       1.20
  @@ -1,7 +1,7 @@
   /* objects.h
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: objects.h,v 1.19 2004/03/04 17:43:53 dan Exp $
  + *     $Id: objects.h,v 1.20 2004/03/04 18:19:38 dan Exp $
    *  Overview:
    *     Parrot class and object header stuff
    *  Data Structure and Algorithms:
  @@ -39,7 +39,7 @@
   PMC *Parrot_single_subclass(Parrot_Interp, PMC *, STRING *);
   void Parrot_new_class(Parrot_Interp, PMC *, STRING *);
   PMC *Parrot_class_lookup(Parrot_Interp, STRING *);
  -void Parrot_class_register(Parrot_Interp, STRING *, PMC *);
  +INTVAL Parrot_class_register(Parrot_Interp, STRING *, PMC *);
   PMC *Parrot_add_parent(Parrot_Interp, PMC *, PMC *);
   PMC *Parrot_remove_parent(Parrot_Interp, PMC *, PMC *);
   PMC *Parrot_multi_subclass(Parrot_Interp, PMC *, STRING *);
  
  
  
  1.49      +11 -4     parrot/src/objects.c
  
  Index: objects.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/objects.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -w -r1.48 -r1.49
  --- objects.c 4 Mar 2004 15:28:41 -0000       1.48
  +++ objects.c 4 Mar 2004 18:19:41 -0000       1.49
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: objects.c,v 1.48 2004/03/04 15:28:41 dan Exp $
  +$Id: objects.c,v 1.49 2004/03/04 18:19:41 dan Exp $
   
   =head1 NAME
   
  @@ -294,6 +294,8 @@
   {
       PMC *class_array;
       PMC *classname_pmc;
  +    PMC *vtable_pmc;
  +    INTVAL new_class_number;
   
       /* Hang an array off the data pointer, empty of course */
       class_array = PMC_data(class) = pmc_new(interpreter, enum_class_SArray);
  @@ -311,6 +313,9 @@
       VTABLE_set_pmc_keyed_int(interpreter, class_array, PCD_CLASS_ATTRIBUTES,
               pmc_new(interpreter, enum_class_Array));
   
  +    VTABLE_set_pmc_keyed_int(interpreter, class_array, PCD_OBJECT_VTABLE,
  +            vtable_pmc = pmc_new(interpreter, enum_class_VtableCache));
  +
   
       /* Set the classname, if we have one */
       classname_pmc = pmc_new(interpreter, enum_class_PerlString);
  @@ -318,7 +323,7 @@
       VTABLE_set_pmc_keyed_int(interpreter, class_array, PCD_CLASS_NAME,
               classname_pmc);
   
  -    Parrot_class_register(interpreter, class_name, class);
  +    new_class_number = Parrot_class_register(interpreter, class_name, class);
       rebuild_attrib_stuff(interpreter, class);
   }
   
  @@ -346,7 +351,7 @@
   
   /*
   
  -=item C<void
  +=item C<INTVAL
   Parrot_class_register(Parrot_Interp interpreter, STRING *class_name,
           PMC *new_class)>
   
  @@ -360,7 +365,7 @@
   
   */
   
  -void
  +INTVAL
   Parrot_class_register(Parrot_Interp interpreter, STRING *class_name,
           PMC *new_class)
   {
  @@ -400,6 +405,8 @@
   
       /* Put our new vtable in the global table */
       Parrot_base_vtables[new_type] = new_vtable;
  +
  +    return new_type;
   }
   
   /*
  
  
  

Reply via email to