summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-05-21 14:49:30 +0100
committerDavid Mitchell <davem@iabyn.com>2013-06-02 22:28:53 +0100
commit1cb48e53e0cc9d610c1829b47f3ef0babdb62477 (patch)
tree5ac6e15925f57dd36a025d0e648bc54233c12077 /regexp.h
parent0254aed965cd47adab9025a192546e4a5e63873a (diff)
downloadperl-1cb48e53e0cc9d610c1829b47f3ef0babdb62477.tar.gz
eliminate PL_reg_maxiter, PL_reg_leftiter
Move these two fields of PL_reg_state into the regmatch_info struct, so they are local to each match.
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/regexp.h b/regexp.h
index bc3871a3c8..51bba06e25 100644
--- a/regexp.h
+++ b/regexp.h
@@ -611,6 +611,8 @@ typedef struct {
char *ganch;
char *cutpoint;
regmatch_eval_state *eval_state; /* extra saved state for (?{}) */
+ I32 poscache_maxiter; /* how many whilems todo before S-L cache kicks in */
+ I32 poscache_iter; /* current countdown from _maxiter to zero */
bool intuit; /* re_intuit_start() is the top-level caller */
bool is_utf8_pat; /* regex is utf8 */
bool is_utf8_target; /* string being matched is utf8 */
@@ -787,15 +789,11 @@ typedef struct regmatch_slab {
} regmatch_slab;
#define PL_reg_curpm PL_reg_state.re_state_reg_curpm
-#define PL_reg_maxiter PL_reg_state.re_state_reg_maxiter
-#define PL_reg_leftiter PL_reg_state.re_state_reg_leftiter
#define PL_reg_poscache PL_reg_state.re_state_reg_poscache
#define PL_reg_poscache_size PL_reg_state.re_state_reg_poscache_size
#define PL_reg_starttry PL_reg_state.re_state_reg_starttry
struct re_save_state {
- I32 re_state_reg_maxiter; /* max wait until caching pos */
- I32 re_state_reg_leftiter; /* wait until caching pos */
PMOP *re_state_reg_curpm; /* from regexec.c */
STRLEN re_state_reg_poscache_size; /* size of pos cache of WHILEM */
char *re_state_reg_poscache; /* cache of pos of WHILEM */