[svn:parrot] r41877 - branches/pcc_reapply/src/call

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Oct 15 09:02:39 UTC 2009


Author: chromatic
Date: Thu Oct 15 09:02:38 2009
New Revision: 41877
URL: https://trac.parrot.org/parrot/changeset/41877

Log:
[PCC] Removed unnecessary GC registration and unregistration of CallSignature
PMCs; a GC-heavy benchmark run with the gcdebug runcore revealed that it's
unnecessary (and on platforms where it is necessary, we'd have other GC
problems).  This provides a 6.36% performance improvement in the fib.pir
benchmark.

Modified:
   branches/pcc_reapply/src/call/args.c
   branches/pcc_reapply/src/call/pcc.c

Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c	Thu Oct 15 09:01:31 2009	(r41876)
+++ branches/pcc_reapply/src/call/args.c	Thu Oct 15 09:02:38 2009	(r41877)
@@ -483,10 +483,8 @@
     PMC            *ctx        = CURRENT_CONTEXT(interp);
     STRING         *string_sig = Parrot_str_new(interp, "", 0);
 
-    if (PMC_IS_NULL(signature)) {
+    if (PMC_IS_NULL(signature))
         call_object = pmc_new(interp, enum_class_CallSignature);
-        gc_register_pmc(interp, call_object);
-    }
     else
         call_object = signature;
 
@@ -732,10 +730,8 @@
     PMC            *ctx       = CURRENT_CONTEXT(interp);
     PMC            *returns   = pmc_new(interp, enum_class_ResizablePMCArray);
 
-    if (PMC_IS_NULL(signature)) {
+    if (PMC_IS_NULL(signature))
         call_object = pmc_new(interp, enum_class_CallSignature);
-        gc_register_pmc(interp, call_object);
-    }
     /* A hack to support 'get_results' as the way of fetching the
      * exception object inside an exception handler. The first argument
      * in the call object is the exception, stick it directly into the

Modified: branches/pcc_reapply/src/call/pcc.c
==============================================================================
--- branches/pcc_reapply/src/call/pcc.c	Thu Oct 15 09:01:31 2009	(r41876)
+++ branches/pcc_reapply/src/call/pcc.c	Thu Oct 15 09:02:38 2009	(r41877)
@@ -147,7 +147,6 @@
     /* Invoke the subroutine object with the given CallSignature object */
     interp->current_object = pmc;
     Parrot_pcc_invoke_from_sig_object(interp, sub_obj, sig_obj);
-    gc_unregister_pmc(interp, sig_obj);
 }
 
 /*
@@ -192,8 +191,6 @@
     /* Invoke the subroutine object with the given CallSignature object */
     interp->current_object = pmc;
     Parrot_pcc_invoke_from_sig_object(interp, sub_obj, sig_obj);
-    gc_unregister_pmc(interp, sig_obj);
-
 }
 
 
@@ -246,7 +243,6 @@
         runops(interp, offset);
         Interp_core_SET(interp, old_core);
     }
-    gc_unregister_pmc(interp, call_object);
     Parrot_pcc_set_signature(interp, ctx, NULL);
     Parrot_pop_context(interp);
 }


More information about the parrot-commits mailing list