This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Implement struct type_stack with a vector
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Simon Marchi <simon dot marchi at ericsson dot com>
- Date: Mon, 27 Aug 2018 18:48:20 -0700
- Subject: Re: [PATCH] Implement struct type_stack with a vector
- References: <1535404324-7683-1-git-send-email-simon.marchi@ericsson.com>
On Mon, 27 Aug 2018 17:12:04 -0400
Simon Marchi <simon.marchi@ericsson.com> wrote:
> This patch changes the home-made stack implementation with a vector,
> which makes it a bit more concise and readable.
>
> Regtested on the buildbot.
>
> gdb/ChangeLog:
>
> * parser-defs.h (struct type_stack) <elements>: Change type to
> std::vector<union type_stack_elt>.
> <depth, size>: Remove.
> * parse.c (parse_exp_in_context_1): Adjust.
> (type_stack_reserve): Remove.
> (check_type_stack_depth): Remove.
> (insert_into_type_stack): Adjust to std::vector.
> (insert_type): Likewise.
> (push_type): Likewise.
> (push_type_int): Likewise.
> (insert_type_address_space): Likewise.
> (pop_type): Likewise.
> (pop_type_int): Likewise.
> (pop_typelist): Likewise.
> (pop_type_stack): Likewise.
> (append_type_stack): Likewise.
> (push_type_stack): Likewise.
> (get_type_stack): Likewise.
> (type_stack_cleanup): Likewise.
> (push_typelist): Likewise.
> (follow_types): Likewise.
> (_initialize_parse): Likewise.
LGTM.
Kevin