[svn:parrot] r46052 - branches/compact_pool_revamp/src/call

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Apr 27 08:37:08 UTC 2010


Author: chromatic
Date: Tue Apr 27 08:37:07 2010
New Revision: 46052
URL: https://trac.parrot.org/parrot/changeset/46052

Log:
[PCC] Added a very minor optimization and consted Parrot_pcc_free_registers().

Modified:
   branches/compact_pool_revamp/src/call/context.c

Modified: branches/compact_pool_revamp/src/call/context.c
==============================================================================
--- branches/compact_pool_revamp/src/call/context.c	Tue Apr 27 07:57:24 2010	(r46051)
+++ branches/compact_pool_revamp/src/call/context.c	Tue Apr 27 08:37:07 2010	(r46052)
@@ -523,18 +523,12 @@
 {
     ASSERT_ARGS(Parrot_pcc_free_registers)
     Parrot_CallContext_attributes * const ctx = PARROT_CALLCONTEXT(pmcctx);
-    size_t reg_size;
 
-    if (!ctx)
-        return;
-
-    reg_size = Parrot_pcc_calculate_registers_size(interp, ctx->n_regs_used);
-    if (!reg_size)
-        return;
-
-    /* Free registers */
-    Parrot_gc_free_fixed_size_storage(interp, reg_size, ctx->registers);
+    const size_t reg_size =
+        Parrot_pcc_calculate_registers_size(interp, ctx->n_regs_used);
 
+    if (reg_size)
+        Parrot_gc_free_fixed_size_storage(interp, reg_size, ctx->registers);
 }
 
 


More information about the parrot-commits mailing list