cvsuser     04/11/10 07:54:02

  Modified:    classes  parrotclass.pmc
               t/pmc    freeze.t
  Log:
  freeze_thaw a class 6 - attributes
  
  Revision  Changes    Path
  1.29      +4 -4      parrot/classes/parrotclass.pmc
  
  Index: parrotclass.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/classes/parrotclass.pmc,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- parrotclass.pmc   10 Nov 2004 15:01:15 -0000      1.28
  +++ parrotclass.pmc   10 Nov 2004 15:54:01 -0000      1.29
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: parrotclass.pmc,v 1.28 2004/11/10 15:01:15 leo Exp $
  +$Id: parrotclass.pmc,v 1.29 2004/11/10 15:54:01 leo Exp $
   
   =head1 NAME
   
  @@ -173,7 +173,7 @@
           /* 3) attributes array */
           if (info->what == VISIT_THAW_NORMAL ||
                   info->what == VISIT_FREEZE_AT_DESTRUCT)
  -            pos = class_data + PCD_MAX;
  +            pos = class_data + PCD_MAX + 1;
           else
               pos = class_data + PCD_CLASS_ATTRIBUTES;
           info->thaw_ptr = pos;
  @@ -268,7 +268,7 @@
               n = 0;
           else
               n = VTABLE_elements(INTERP, parents);
  -        if (n != nold)
  +        if (nold && n != nold)
               internal_exception(1, "thawed class differs");
           /* TODO compare elements */
           if (!nold) {
  @@ -287,7 +287,7 @@
               n = 0;
           else
               n = VTABLE_elements(INTERP, attribs);
  -        if (n != nold)
  +        if (nold && n != nold)
               internal_exception(1, "thawed class differs");
           /* TODO compare attribs */
   
  
  
  
  1.18      +6 -12     parrot/t/pmc/freeze.t
  
  Index: freeze.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/pmc/freeze.t,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- freeze.t  10 Nov 2004 15:01:17 -0000      1.17
  +++ freeze.t  10 Nov 2004 15:54:02 -0000      1.18
  @@ -1,6 +1,6 @@
   #! perl -w
   # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -# $Id: freeze.t,v 1.17 2004/11/10 15:01:17 leo Exp $
  +# $Id: freeze.t,v 1.18 2004/11/10 15:54:02 leo Exp $
   
   =head1 NAME
   
  @@ -482,8 +482,6 @@
   Foo
   OUTPUT
   
  -SKIP: {
  -#    skip("todo class exists", 1);
   output_is(<<'CODE', <<'OUTPUT', "freeze/thaw simple class");
       newclass P10, "Foo"
       classname S10, P10
  @@ -502,7 +500,7 @@
   ok
   Foo
   OUTPUT
  -}
  +
   
   output_is(<<'CODE', <<'OUTPUT', "freeze class w attr");
       newclass P10, "Foo"
  @@ -523,9 +521,7 @@
   ok 2
   OUTPUT
   
  -SKIP: {
  -     skip("todo class attrs", 1);
  -output_is(<<'CODE', <<'OUTPUT', "thaw class  w attr into new interpreter");
  +output_is(<<'CODE', <<'OUTPUT', "thaw class w attr into new interpreter");
       set S3, "temp.fpmc"
       .include "stat.pasm"
       stat I0, S3, .STAT_FILESIZE
  @@ -564,10 +560,8 @@
   ok 4
   ok 5
   OUTPUT
  -}
  -SKIP: {
  -     skip("todo class attrs", 1);
  -output_is(<<'CODE', <<'OUTPUT', "thaw class  w attrr");
  +
  +output_is(<<'CODE', <<'OUTPUT', "thaw class w attr same interp");
       newclass P10, "Foo"
       addattribute P10, ".aa"
       addattribute P10, ".bb"
  @@ -617,4 +611,4 @@
   ok 5
   ok 6
   OUTPUT
  -}
  +
  
  
  

Reply via email to