summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-03-31 20:52:53 +0000
committerNicholas Clark <nick@ccl4.org>2007-03-31 20:52:53 +0000
commit1b5c067c53616dae46b48a67460c08ec2c2ec4c4 (patch)
tree1b73ccad1c2bee75a8a89b30d75dafaeba9ad23d /regcomp.h
parent10019e56dfe9039511d7fd017e5fae5a0f487e00 (diff)
downloadperl-1b5c067c53616dae46b48a67460c08ec2c2ec4c4.tar.gz
Reorder the members of various regexp structs to reduce their size on
LP64 platforms, by pairing up I32 and U32 members. Notably structs _reg_trie_data, reg_ac_data, regexp and regmatch_state down by 8 bytes, re_save_state by 16, and regmatch_slab up by 48 (ie one more state per slab) p4raw-id: //depot/perl@30815
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/regcomp.h b/regcomp.h
index 4799b1f57e..a13d487535 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -561,20 +561,20 @@ typedef struct _reg_trie_trans reg_trie_trans;
optimisation in Perl_regdupe. */
struct _reg_trie_data {
U32 refcount; /* number of times this trie is referenced */
- U16 uniquecharcount; /* unique chars in trie (width of trans table) */
U32 lasttrans; /* last valid transition element */
U16 *charmap; /* byte to charid lookup array */
reg_trie_state *states; /* state data */
reg_trie_trans *trans; /* array of transition elements */
char *bitmap; /* stclass bitmap */
- U32 startstate; /* initial state - used for common prefix optimisation */
- STRLEN minlen; /* minimum length of words in trie - build/opt only? */
- STRLEN maxlen; /* maximum length of words in trie - build/opt only? */
U32 *wordlen; /* array of lengths of words */
U16 *jump; /* optional 1 indexed array of offsets before tail
for the node following a given word. */
U16 *nextword; /* optional 1 indexed array to support linked list
of duplicate wordnums */
+ U16 uniquecharcount; /* unique chars in trie (width of trans table) */
+ U32 startstate; /* initial state - used for common prefix optimisation */
+ STRLEN minlen; /* minimum length of words in trie - build/opt only? */
+ STRLEN maxlen; /* maximum length of words in trie - build/opt only? */
U32 statecount; /* Build only - number of states in the states array
(including the unused zero state) */
U32 wordcount; /* Build only */
@@ -600,9 +600,9 @@ typedef struct _reg_trie_data reg_trie_data;
optimisation in Perl_regdupe. */
struct _reg_ac_data {
U32 refcount;
+ U32 trie;
U32 *fail;
reg_trie_state *states;
- U32 trie;
};
typedef struct _reg_ac_data reg_ac_data;