[svn:parrot] r45210 - trunk/src/packfile

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Mar 27 21:34:39 UTC 2010


Author: chromatic
Date: Sat Mar 27 21:34:39 2010
New Revision: 45210
URL: https://trac.parrot.org/parrot/changeset/45210

Log:
[PF] Tidied code in PF_fetch_string() to give the compiler slightly better
optimization possibilities.  The code's also shorter; don't worry.  No
functional changes and minor performance improvements.

Modified:
   trunk/src/packfile/pf_items.c

Modified: trunk/src/packfile/pf_items.c
==============================================================================
--- trunk/src/packfile/pf_items.c	Sat Mar 27 21:34:36 2010	(r45209)
+++ trunk/src/packfile/pf_items.c	Sat Mar 27 21:34:39 2010	(r45210)
@@ -1309,17 +1309,13 @@
 {
     ASSERT_ARGS(PF_fetch_string)
     STRING   *s;
-    UINTVAL   flags    = PF_fetch_opcode(pf, cursor);
-    const int wordsize = pf ? pf->header->wordsize : sizeof (opcode_t);
-    size_t    size;
-    opcode_t  charset_nr;
+    UINTVAL   flags      = PF_fetch_opcode(pf, cursor);
+    opcode_t  charset_nr = PF_fetch_opcode(pf, cursor);
+    size_t    size       = (size_t)PF_fetch_opcode(pf, cursor);
+    const int wordsize   = pf ? pf->header->wordsize : sizeof (opcode_t);
 
     /* don't let PBC mess our internals - only constant or not */
     flags      &= (PObj_constant_FLAG | PObj_private7_FLAG);
-    charset_nr  = PF_fetch_opcode(pf, cursor);
-
-    /* These may need to be separate */
-    size        = (size_t)PF_fetch_opcode(pf, cursor);
 
     TRACE_PRINTF(("PF_fetch_string(): flags=0x%04x, ", flags));
     TRACE_PRINTF(("charset_nr=%ld, ", charset_nr));


More information about the parrot-commits mailing list