Commit faec11db authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(PUSH_FAILURE_POINT, POP_FAILURE_POINT): Don't push or pop

register values if POSIX backtracking is turned off.
(NUM_FAILURE_ITEMS): Value is 0 if no POSIX backtracking.
parent 49530862
...@@ -1153,6 +1153,7 @@ typedef struct ...@@ -1153,6 +1153,7 @@ typedef struct
/* Push the info, starting with the registers. */ \ /* Push the info, starting with the registers. */ \
DEBUG_PRINT1 ("\n"); \ DEBUG_PRINT1 ("\n"); \
\ \
if (!RE_NO_POSIX_BACKTRACKING & bufp->syntax) \
for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
this_reg++) \ this_reg++) \
{ \ { \
...@@ -1213,7 +1214,9 @@ typedef struct ...@@ -1213,7 +1214,9 @@ typedef struct
/* We actually push this many items. */ /* We actually push this many items. */
#define NUM_FAILURE_ITEMS \ #define NUM_FAILURE_ITEMS \
((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS \ (((RE_NO_POSIX_BACKTRACKING & bufp->syntax \
? 0 : highest_active_reg - lowest_active_reg + 1) \
* NUM_REG_ITEMS) \
+ NUM_NONREG_ITEMS) + NUM_NONREG_ITEMS)
/* How many items can still be added to the stack without overflowing it. */ /* How many items can still be added to the stack without overflowing it. */
...@@ -1272,6 +1275,7 @@ typedef struct ...@@ -1272,6 +1275,7 @@ typedef struct
low_reg = (unsigned) POP_FAILURE_INT (); \ low_reg = (unsigned) POP_FAILURE_INT (); \
DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \
\ \
if (!RE_NO_POSIX_BACKTRACKING & bufp->syntax) \
for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
{ \ { \
DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment