On Mon Apr 20 04:19:36 2009, bacek wrote:
> On Mon Feb 02 08:19:30 2009, Whiteknight wrote:
> > On Mon Oct 22 10:48:56 2007, pcoch wrote:
> > > In src/pmc/exception_handler.pmc there is the todo item:
> 
> > aren't exception_handlers PMCs? If so, they wouldn't have a ref count,
> > they would be GC'd and not collected prematurely. Is this ticket still
> > an issue?
> 
> +1 for rejecting ticket.
> 

Removing ExceptionHandler's destroy VTABLE function causes no test
failures, so it looks like the comment no longer applies.  The attached
patch takes care of this, but probably shouldn't be applied until after
the 1.1 release tomorrow.  Once that's done, this ticket can be resolved.
Index: src/pmc/exceptionhandler.pmc
===================================================================
--- src/pmc/exceptionhandler.pmc	(revision 38235)
+++ src/pmc/exceptionhandler.pmc	(working copy)
@@ -79,31 +79,6 @@
             pobject_lives(interp, (PObj *)core_struct->handled_types_except);
     }
 
-    /*
-     * can't reuse Continuation's destroy yet -
-     * RT #46703 fix ref_count handling for exception_handlers first
-     *
-     * An ExceptionHandler is kind of a limited Continuation
-     * (can only call 'up the stack').  Therefore we probably don't
-     * have to convert all RetContinuations to real Continuations
-     */
-
-    VTABLE void destroy() {
-        Parrot_cont                        * const cc          = (Parrot_cont *)PMC_cont(SELF);
-        Parrot_ExceptionHandler_attributes * const core_struct =
-            PARROT_EXCEPTIONHANDLER(SELF);
-
-        if (cc) {
-            mem_sys_free(cc);
-            PMC_cont(SELF) = NULL;
-        }
-
-        if (core_struct) {
-            mem_sys_free(core_struct);
-            PMC_data(SELF) = NULL;
-        }
-    }
-
     VTABLE PMC *clone() {
         PMC * const result = SUPER();
         PObj_custom_mark_CLEAR(result);
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to