cvsuser     04/11/17 01:21:30

  Modified:    src      inter_misc.c
               t/op     gc.t
  Log:
  clone returned continuation
  
  Revision  Changes    Path
  1.13      +7 -2      parrot/src/inter_misc.c
  
  Index: inter_misc.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/inter_misc.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- inter_misc.c      9 Nov 2004 17:16:44 -0000       1.12
  +++ inter_misc.c      17 Nov 2004 09:21:29 -0000      1.13
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: inter_misc.c,v 1.12 2004/11/09 17:16:44 leo Exp $
  +$Id: inter_misc.c,v 1.13 2004/11/17 09:21:29 leo Exp $
   
   =head1 NAME
   
  @@ -237,11 +237,16 @@
   PMC*
   interpinfo_p(Interp *interpreter, INTVAL what)
   {
  +    PMC *cont;
       switch (what) {
           case CURRENT_SUB:
               return interpreter->ctx.current_sub;
           case CURRENT_CONT:
  -            return interpreter->ctx.current_cont;
  +            cont = interpreter->ctx.current_cont;
  +            if (!PMC_IS_NULL(cont) && cont->vtable->base_type ==
  +                    enum_class_RetContinuation)
  +                return VTABLE_clone(interpreter, cont);
  +            return cont;
           case CURRENT_OBJECT:
               return interpreter->ctx.current_object;
           case CURRENT_NAMESPACE_ROOT: /* XXX */
  
  
  
  1.23      +3 -7      parrot/t/op/gc.t
  
  Index: gc.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/op/gc.t,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- gc.t      15 Nov 2004 10:31:03 -0000      1.22
  +++ gc.t      17 Nov 2004 09:21:30 -0000      1.23
  @@ -1,6 +1,6 @@
   #! perl -w
   # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -# $Id: gc.t,v 1.22 2004/11/15 10:31:03 leo Exp $
  +# $Id: gc.t,v 1.23 2004/11/17 09:21:30 leo Exp $
   
   =head1 NAME
   
  @@ -407,7 +407,8 @@
        new_pad 1
        find_lex $P0, "fail"
        store_lex 1, "old_fail", $P0
  -     $P1 = clone P1
  +     .include "interpinfo.pasm"
  +     $P1 = interpinfo .INTERPINFO_CURRENT_CONT
        store_lex 1, "cc", $P1
        newsub our_try, .Closure, _try
        store_lex 1, "try", our_try
  @@ -440,16 +441,11 @@
   new_fail:
        .local pmc our_try
        .local pmc our_cc
  -     save P1
        #print "In new_fail\n"
        our_cc = find_lex "cc"
        our_try = find_lex "try"
        $P2 = find_lex "choices"
        $P3 = our_try($P2)
  -     restore P1
  -     unless our_cc == P1 goto do_return
  -     print "Something's very wrong with continuations!\n"
  -do_return:
        our_cc($P3)
   .end
   
  
  
  

Reply via email to