develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33450 - in trunk: src src/pmc t/op

From:
tene
Date:
December 2, 2008 22:36
Subject:
[svn:parrot] r33450 - in trunk: src src/pmc t/op
Message ID:
20081203063636.9774ACB9AF@x12.develooper.com
Author: tene
Date: Tue Dec  2 22:36:29 2008
New Revision: 33450

Modified:
   trunk/src/pmc/exceptionhandler.pmc
   trunk/src/scheduler.c
   trunk/src/thread.c
   trunk/t/op/exceptions.t

Log:
[exceptions]
* Remove the 'automatically disable exception handlers' behavior
* Resumable exceptions work properly now.
* Dumb down the builtin exception handler for threads on allison's
  recommendation. This should probably be fixed properly eventually.
* One additional parrot test passes.  No additional fails.

Modified: trunk/src/pmc/exceptionhandler.pmc
==============================================================================
--- trunk/src/pmc/exceptionhandler.pmc	(original)
+++ trunk/src/pmc/exceptionhandler.pmc	Tue Dec  2 22:36:29 2008
@@ -221,13 +221,7 @@
                 RETURN(INTVAL 1);
             }
 
-            /* The exception handler has already been used before. */
-            else if (VTABLE_get_integer(INTERP, SELF)) {
-                RETURN(INTVAL 0);
-            }
-            else {
-                RETURN(INTVAL 1);
-            }
+            RETURN(INTVAL 1);
         }
 
         RETURN(INTVAL 0);

Modified: trunk/src/scheduler.c
==============================================================================
--- trunk/src/scheduler.c	(original)
+++ trunk/src/scheduler.c	Tue Dec  2 22:36:29 2008
@@ -769,9 +769,6 @@
                         /* Store iterator and context for a later rethrow. */
                         VTABLE_set_attr_str(interp, task, CONST_STRING(interp, "handler_iter"), iter);
                         VTABLE_set_pointer(interp, task, context);
-
-                        /* Mark that this handler has been used before. */
-                        VTABLE_set_integer_native(interp, handler, 1);
                     }
                     return handler;
                 }

Modified: trunk/src/thread.c
==============================================================================
--- trunk/src/thread.c	(original)
+++ trunk/src/thread.c	Tue Dec  2 22:36:29 2008
@@ -455,16 +455,16 @@
     sub_arg            = PMC_pmc_val(self);
 
     if (setjmp(jump_point.resume)) {
-        PMC *exception = Parrot_cx_peek_task(interp);
         /* caught exception */
         /* XXX what should we really do here */
+        /* PMC *exception = Parrot_cx_peek_task(interp);
         PIO_eprintf(interp,
                     "Unhandled exception in thread with tid %d "
                     "(message=%Ss, number=%d)\n",
                     interp->thread_data->tid,
                     VTABLE_get_string(interp, exception),
                     VTABLE_get_integer_keyed_str(interp, exception,
-                        const_string(interp, "type")));
+                        const_string(interp, "type"))); */
 
         ret_val = PMCNULL;
     }

Modified: trunk/t/op/exceptions.t
==============================================================================
--- trunk/t/op/exceptions.t	(original)
+++ trunk/t/op/exceptions.t	Tue Dec  2 22:36:29 2008
@@ -645,7 +645,7 @@
 After throwing
 OUTPUT
 
-pir_output_is( <<'CODE', <<'OUTPUT', "Resumable exceptions from a different context", todo => "Pending Tene's 'stop disabling exception handlers' patch." );
+pir_output_is( <<'CODE', <<'OUTPUT', "Resumable exceptions from a different context");
 .sub main :main
     push_eh catcher
     'foo'()



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About