This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Implement struct type_stack with a vector


On 2018-08-27 21:48, Kevin Buettner wrote:
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

Thanks, I pushed it.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]