[svn:parrot] r45879 - trunk/src/call

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Apr 21 23:58:41 UTC 2010


Author: chromatic
Date: Wed Apr 21 23:58:41 2010
New Revision: 45879
URL: https://trac.parrot.org/parrot/changeset/45879

Log:
[PCC] Removed redundant fetches of the same data in static, inlinable functions.

Modified:
   trunk/src/call/context.c

Modified: trunk/src/call/context.c
==============================================================================
--- trunk/src/call/context.c	Wed Apr 21 23:57:52 2010	(r45878)
+++ trunk/src/call/context.c	Wed Apr 21 23:58:41 2010	(r45879)
@@ -79,7 +79,7 @@
     ARGIN(const UINTVAL *number_regs_used))
         __attribute__nonnull__(2);
 
-static void clear_regs(PARROT_INTERP, ARGMOD(PMC *pmcctx))
+static void clear_regs(PARROT_INTERP, ARGMOD(Parrot_Context *ctx))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pmcctx);
@@ -253,11 +253,10 @@
 */
 
 static void
-clear_regs(PARROT_INTERP, ARGMOD(PMC *pmcctx))
+clear_regs(PARROT_INTERP, ARGMOD(Parrot_Context *ctx))
 {
     ASSERT_ARGS(clear_regs)
     UINTVAL i;
-    Parrot_Context *ctx = get_context_struct_fast(interp, pmcctx);
 
     /* NULL out registers - P/S have to be NULL for GC
      *
@@ -350,7 +349,7 @@
     }
 
     /* other stuff is set inside Sub.invoke */
-    clear_regs(interp, pmcctx);
+    clear_regs(interp, ctx);
 }
 
 
@@ -488,7 +487,7 @@
     /* ctx.bp_ps points to S0, which has Px on the left */
     ctx->bp_ps.regs_s = (STRING **)((char *)ctx->registers + size_nip);
 
-    clear_regs(interp, pmcctx);
+    clear_regs(interp, ctx);
 }
 
 


More information about the parrot-commits mailing list