summaryrefslogtreecommitdiff
path: root/parser.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-12-03 14:01:19 +0000
committerDavid Mitchell <davem@iabyn.com>2016-12-05 11:54:03 +0000
commit0e0707c5741b52ed1f26e1f69d89b66a1b05f985 (patch)
tree4d6dd171e310f637b0b9cf33d63efbd1555167fb /parser.h
parenta14be3eb83c92f38596c3a429d631615e84e660b (diff)
downloadperl-0e0707c5741b52ed1f26e1f69d89b66a1b05f985.tar.gz
optimising yyparse: replace stack_size with a ptr
Makes testing whether the parser stack needs extending cheaper
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.h b/parser.h
index 9c2209459e..c5a59abc5d 100644
--- a/parser.h
+++ b/parser.h
@@ -42,9 +42,9 @@ typedef struct yy_parser {
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- int stack_size;
int yylen; /* length of active reduction */
yy_stack_frame *stack; /* base of stack */
+ yy_stack_frame *stack_max1;/* (top-1)th element of alloacted stack */
yy_stack_frame *ps; /* current stack frame */
/* lexer state */