[svn:parrot] r45149 - in trunk: src/gc src/pmc t/native_pbc t/op t/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Mar 24 13:31:30 UTC 2010


Author: bacek
Date: Wed Mar 24 13:31:21 2010
New Revision: 45149
URL: https://trac.parrot.org/parrot/changeset/45149

Log:
Revert "Freeze/thaw Sub.outer_sub by name to avoid thawing second
instance of" and all related commits. Apparently I broke too many
things. bacek--

Modified:
   trunk/src/gc/gc_ms.c
   trunk/src/pmc/sub.pmc
   trunk/t/native_pbc/annotations.pbc
   trunk/t/native_pbc/integer_1.pbc
   trunk/t/native_pbc/number_1.pbc
   trunk/t/native_pbc/string_1.pbc
   trunk/t/op/exceptions.t
   trunk/t/op/gc.t
   trunk/t/pmc/exception-old.t

Modified: trunk/src/gc/gc_ms.c
==============================================================================
--- trunk/src/gc/gc_ms.c	Wed Mar 24 09:47:43 2010	(r45148)
+++ trunk/src/gc/gc_ms.c	Wed Mar 24 13:31:21 2010	(r45149)
@@ -523,10 +523,6 @@
     --mem_pools->gc_mark_block_level;
     mem_pools->header_allocs_since_last_collect = 0;
 
-    /* Clean early GC */
-    if (!mem_pools->lazy_gc)
-        mem_pools->num_early_gc_PMCs = 0;
-
     return;
 }
 

Modified: trunk/src/pmc/sub.pmc
==============================================================================
--- trunk/src/pmc/sub.pmc	Wed Mar 24 09:47:43 2010	(r45148)
+++ trunk/src/pmc/sub.pmc	Wed Mar 24 13:31:21 2010	(r45149)
@@ -417,10 +417,10 @@
          * to the new context (refcounted) and convert the
          * retcontinuation to a normal continuation.  */
         if (PObj_get_FLAGS(SELF) & SUB_FLAG_IS_OUTER) {
+            sub->ctx = context;
             /* convert retcontinuation to a continuation */
             ccont->vtable = interp->vtables[enum_class_Continuation];
         }
-        sub->ctx = context;
 
         /* create pad if needed
          * TODO move this up in front of argument passing
@@ -632,6 +632,7 @@
     VTABLE void visit(PMC *info) {
         VISIT_PMC_ATTR(INTERP, info, SELF, Sub, namespace_name);
         VISIT_PMC_ATTR(INTERP, info, SELF, Sub, multi_signature);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Sub, outer_sub);
 
         /*
          * XXX visit_pmc_now is wrong, because it breaks
@@ -702,14 +703,6 @@
             sub->subid = CONST_STRING(INTERP, "");
 
         VTABLE_push_string(INTERP, info, sub->subid);
-
-        /* Store name of outer sub */
-        if (!PMC_IS_NULL(sub->outer_sub)) {
-            VTABLE_push_string(INTERP, info, VTABLE_get_string(INTERP, sub->outer_sub));
-        }
-        else {
-            VTABLE_push_string(INTERP, info, CONST_STRING(INTERP, ""));
-        }
     }
 
 
@@ -727,7 +720,6 @@
         Parrot_Sub_attributes *sub;
         INTVAL flags;
         int    i;
-        STRING *outer_name;
 
         SUPER(info);
 
@@ -752,14 +744,6 @@
             sub->n_regs_used[i] = VTABLE_shift_integer(INTERP, info);
 
         sub->subid        = VTABLE_shift_string(INTERP, info);
-
-        outer_name = VTABLE_shift_string(INTERP, info);
-        if (!Parrot_str_equal(INTERP, outer_name, CONST_STRING(INTERP, ""))) {
-            sub->outer_sub = Parrot_find_name_op(INTERP, outer_name, NULL);
-        }
-        else {
-            sub->outer_sub = PMCNULL;
-        }
     }
 
 

Modified: trunk/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/t/op/exceptions.t
==============================================================================
--- trunk/t/op/exceptions.t	Wed Mar 24 09:47:43 2010	(r45148)
+++ trunk/t/op/exceptions.t	Wed Mar 24 13:31:21 2010	(r45149)
@@ -423,7 +423,19 @@
 No exception handler/
 OUTPUT
 
-pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception" );
+$ENV{TEST_PROG_ARGS} ||= '';
+my @todo = $ENV{TEST_PROG_ARGS} =~ /--run-pbc/
+    ? ( todo => '.tailcall and lexical maps not thawed from PBC, TT #1172' )
+    : ();
+#
+# this test is hanging in testr since pcc_hackathon_6Mar10 branch merge at r45108
+# converting to skip at the moment
+#
+
+SKIP: {
+    skip ".tailcall and lexical maps not thawed from PBC - hangs", 1 if @todo;
+
+pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception", @todo );
 .sub main :main
     .local pmc a
     .lex 'a', a
@@ -447,6 +459,8 @@
 a = 42
 OUTPUT
 
+}
+
 ## Regression test for r14697.  This probably won't be needed when PDD23 is
 ## fully implemented.
 pir_error_output_like( <<'CODE', <<'OUTPUT', "invoke handler in calling sub" );

Modified: trunk/t/op/gc.t
==============================================================================
--- trunk/t/op/gc.t	Wed Mar 24 09:47:43 2010	(r45148)
+++ trunk/t/op/gc.t	Wed Mar 24 13:31:21 2010	(r45149)
@@ -77,7 +77,6 @@
 
 # sweep 0, with object that needs destroy/destroy
 .sub sweep_0_need_destroy_destroy_obj
-    sweep 1
     $P0 = new 'Undef'
     needs_destroy $P0
     $I1 = interpinfo .INTERPINFO_GC_MARK_RUNS   # How many GC mark runs have we done already?

Modified: trunk/t/pmc/exception-old.t
==============================================================================
--- trunk/t/pmc/exception-old.t	Wed Mar 24 09:47:43 2010	(r45148)
+++ trunk/t/pmc/exception-old.t	Wed Mar 24 13:31:21 2010	(r45149)
@@ -1,5 +1,5 @@
 #! perl
-# Copyright (C) 2001-2010, Parrot Foundation.
+# Copyright (C) 2001-2008, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -444,8 +444,19 @@
 No exception handler/
 OUTPUT
 
+$ENV{TEST_PROG_ARGS} ||= '';
+my @todo = $ENV{TEST_PROG_ARGS} =~ /--run-pbc/
+    ? ( todo => '.tailcall and lexical maps not thawed from PBC, TT #1172' )
+    : ();
+#
+# this test is hanging in testr since pcc_hackathon_6Mar10 branch merge at r45108
+# converting to skip at the moment
+#
 
-pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception");
+SKIP: {
+    skip ".tailcall and lexical maps not thawed from PBC - hangs", 1 if @todo;
+
+pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception", @todo );
 .sub main :main
     .local pmc a
     .lex 'a', a
@@ -469,6 +480,7 @@
 a = 42
 OUTPUT
 
+}
 
 ## Regression test for r14697.  This probably won't be needed when PDD23 is
 ## fully implemented.


More information about the parrot-commits mailing list