2019-04-04 Tom Tromey <tom@tromey.com>
+ * dtrace-probe.c (dtrace_probe::build_arg_exprs): Update.
+ * stap-probe.c (stap_parse_argument): Update.
+ * stap-probe.h (struct stap_parse_info) <stap_parse_info>: Remove
+ initial_size parameter.
+ * rust-exp.y (rust_lex_tests): Update.
+ * parse.c (parser_state): Update.
+ (parse_exp_in_context): Update.
+ * parser-defs.h (struct parser_state) <parser_state>: Remove
+ "initial_size" parameter.
+
+2019-04-04 Tom Tromey <tom@tromey.com>
+
* parser-defs.h (increase_expout_size): Don't declare.
* parse.c (increase_expout_size): Now static.
/* Initialize the expression buffer in the parser state. The
language does not matter, since we are using our own
parser. */
- parser_state pstate (10, current_language, gdbarch);
+ parser_state pstate (current_language, gdbarch);
/* The argument value, which is ABI dependent and casted to
`long int'. */
/* See definition in parser-defs.h. */
-parser_state::parser_state (size_t initial_size,
- const struct language_defn *lang,
+parser_state::parser_state (const struct language_defn *lang,
struct gdbarch *gdbarch)
- : expout_size (initial_size),
+ : expout_size (10),
expout (XNEWVAR (expression,
(sizeof (expression)
+ EXP_ELEM_TO_BYTES (expout_size)))),
and others called from *.y) ensure CURRENT_LANGUAGE gets restored
to the value matching SELECTED_FRAME as set by get_current_arch. */
- parser_state ps (10, lang, get_current_arch ());
+ parser_state ps (lang, get_current_arch ());
scoped_restore_current_language lang_saver;
set_language (lang->la_language);
struct parser_state
{
- /* Constructor. INITIAL_SIZE is the initial size of the expout
- array. LANG is the language used to parse the expression. And
- GDBARCH is the gdbarch to use during parsing. */
+ /* Constructor. LANG is the language used to parse the expression.
+ And GDBARCH is the gdbarch to use during parsing. */
- parser_state (size_t initial_size, const struct language_defn *lang,
+ parser_state (const struct language_defn *lang,
struct gdbarch *gdbarch);
DISABLE_COPY_AND_ASSIGN (parser_state);
int i;
// Set up dummy "parser", so that rust_type works.
- struct parser_state ps (0, &rust_language_defn, target_gdbarch ());
+ struct parser_state ps (&rust_language_defn, target_gdbarch ());
rust_parser parser (&ps);
rust_lex_test_one (&parser, "", 0);
/* We need to initialize the expression buffer, in order to begin
our parsing efforts. We use language_c here because we may need
to do pointer arithmetics. */
- struct stap_parse_info p (*arg, atype, 10, language_def (language_c),
+ struct stap_parse_info p (*arg, atype, language_def (language_c),
gdbarch);
stap_parse_argument_1 (&p, 0, STAP_OPERAND_PREC_NONE);
struct stap_parse_info
{
stap_parse_info (const char *arg_, struct type *arg_type_,
- size_t initial_size, const struct language_defn *lang,
+ const struct language_defn *lang,
struct gdbarch *gdbarch)
: arg (arg_),
- pstate (initial_size, lang, gdbarch),
+ pstate (lang, gdbarch),
saved_arg (arg_),
arg_type (arg_type_),
gdbarch (gdbarch),