From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] C++-ify parser_state
Date: Sun, 10 Dec 2017 21:23:00 -0000 [thread overview]
Message-ID: <618519a01ec8df27ea6bdebbcc373bb4@polymtl.ca> (raw)
In-Reply-To: <87indgtsy1.fsf@tromey.com>
On 2017-12-08 23:40, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> Oops, I realized I only answered half the question. I added a
> second
> Simon> patch on top.
>
> No problem. How's this?
LGTM, with some nits.
> commit ee14e980825b5eabd6753a52c75b73dda0762bf2
> Author: Tom Tromey <tom@tromey.com>
> Date: Wed Nov 22 21:45:53 2017 -0700
>
> C++-ify parser_state
>
> This mildly C++-ifies parser_state and stap_parse_info -- just
> enough
> to remove some cleanups.
>
> This version includes the changes implemented by Simon.
>
> Regression tested by the buildbot.
>
> ChangeLog
> 2017-11-26 Tom Tromey <tom@tromey.com>
> Simon Marchi <simon.marchi@ericsson.com>
>
> * stap-probe.h (struct stap_parse_info): Add constructor,
> destructor.
> * stap-probe.c (stap_parse_argument): Update.
> * rust-exp.y (rust_lex_tests): Update.
> * parser-defs.h (struct parser_state): Add constructor,
> destructor, release method.
> (null_post_parser): Change type.
> <expout>: Change type to expression_up.
This last line should be before "null_post_parser" I think.
> (initialize_expout, reallocate_expout): Remove.
> * parse.c (parser_state::parser_state): Rename from
> initialize_expout.
> (parser_state::release): Rename from reallocate_expout.
write_exp_elt, increase_expout_size should be mentioned.
> (parse_exp_in_context_1): Update.
> (null_post_parser): Change type of "exp".
> * dtrace-probe.c (dtrace_probe::build_arg_exprs): Update.
> * ada-lang.c (resolve, resolve_subexp)
> (replace_operator_with_call): Change type of "expp".
> * language.h (struct language_defn) <la_post_parser>:
> Change type
> of "expp".
...
> --- a/gdb/stap-probe.h
> +++ b/gdb/stap-probe.h
> @@ -28,6 +28,22 @@
>
> struct stap_parse_info
> {
> + stap_parse_info (const char *arg_, struct type *arg_type_,
> + size_t initial_size, const struct language_defn *lang,
> + struct gdbarch *gdbarch)
> + : arg (arg_),
> + pstate (initial_size, lang, gdbarch),
> + saved_arg (arg_),
> + arg_type (arg_type_),
> + gdbarch (gdbarch),
> + inside_paren_p (0)
> + {
> + }
> +
> + ~stap_parse_info () = default;
This can be removed.
Thanks,
Simon
next prev parent reply other threads:[~2017-12-10 21:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-26 17:40 Tom Tromey
2017-11-27 14:17 ` Sergio Durigan Junior
2017-11-27 16:41 ` Simon Marchi
2017-11-30 3:29 ` Tom Tromey
2017-11-30 3:54 ` Simon Marchi
2017-11-30 5:49 ` Simon Marchi
2017-12-09 4:41 ` Tom Tromey
2017-12-10 21:23 ` Simon Marchi [this message]
2017-12-31 0:04 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=618519a01ec8df27ea6bdebbcc373bb4@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).