Reorder the members of struct re_save_state to reduce its size on LP64.
authorNicholas Clark <nick@ccl4.org>
Mon, 25 Feb 2013 16:50:35 +0000 (17:50 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 26 Feb 2013 15:19:04 +0000 (16:19 +0100)
This drops its size by 8 bytes on LP64 platforms. This also makes the
interpreter struct 8 bytes smaller, as it embeds a re_save_state struct.

regexp.h

index 6f79be7..51630e4 100644 (file)
--- a/regexp.h
+++ b/regexp.h
@@ -776,6 +776,10 @@ struct re_save_state {
     bool re_state_eval_setup_done;     /* from regexec.c */
     bool re_state_reg_match_utf8;      /* from regexec.c */
     bool re_reparsing;                 /* runtime (?{}) fed back into parser */
+    /* Space for U8 */
+    I32 re_state_reg_oldpos;           /* from regexec.c */
+    I32 re_state_reg_maxiter;          /* max wait until caching pos */
+    I32 re_state_reg_leftiter;         /* wait until caching pos */
     char *re_state_bostr;
     char *re_state_regeol;             /* End of input, for $ check. */
     MAGIC *re_state_reg_magic;         /* from regexec.c */
@@ -786,9 +790,6 @@ struct re_save_state {
     STRLEN re_state_reg_oldsavedoffset;        /* old offset of saved substr during match */
     STRLEN re_state_reg_oldsavedcoffset;/* old coffset of saved substr during match */
     STRLEN re_state_reg_poscache_size; /* size of pos cache of WHILEM */
-    I32 re_state_reg_oldpos;           /* from regexec.c */
-    I32 re_state_reg_maxiter;          /* max wait until caching pos */
-    I32 re_state_reg_leftiter;         /* wait until caching pos */
     char *re_state_reg_poscache;       /* cache of pos of WHILEM */
     char *re_state_reg_starttry;       /* from regexec.c */
 #ifdef PERL_ANY_COW