diff options
author | David Mitchell <davem@iabyn.com> | 2014-02-10 14:52:46 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2014-03-16 18:03:49 +0000 |
commit | c68d900fa69a98fc307d2b8a88927a1c4b609bc0 (patch) | |
tree | 03d00e070ed19615581cd03b6dad73476abe799a /regexec.c | |
parent | ee5cbb25cd8121857974ab2c66dc5acd2467b5da (diff) | |
download | perl-c68d900fa69a98fc307d2b8a88927a1c4b609bc0.tar.gz |
re_intuit_start(): reduce use of s in stclass code
s is mainly acting as a stand-in for rx_origin; so just use rx_origin
directly.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1288,14 +1288,13 @@ Perl_re_intuit_start(pTHX_ if (prog->substrs->check_ix == 0) { /* check is anchored */ DEBUG_EXECUTE_r( what = "anchored" ); hop_and_restart: - s = HOP3c(t, 1, strend); - if (s + start_shift + end_shift > strend) { + rx_origin = HOP3c(t, 1, strend); + if (rx_origin + start_shift + end_shift > strend) { /* XXXX Should be taken into account earlier? */ DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, " Could not match STCLASS...\n") ); goto fail; } - rx_origin = s; DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, " Looking for %s substr starting at offset %ld...\n", what, (long)(rx_origin + start_shift - strpos)) ); @@ -1318,7 +1317,7 @@ Perl_re_intuit_start(pTHX_ /* Another way we could have checked stclass at the current position only: */ if (ml_anch) { - s = rx_origin = t + 1; + rx_origin = t + 1; if (!check) goto giveup; DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log, |