From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15463 invoked by alias); 28 Aug 2018 01:48:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 15412 invoked by uid 89); 28 Aug 2018 01:48:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Aug 2018 01:48:23 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 11CC5308FC53; Tue, 28 Aug 2018 01:48:22 +0000 (UTC) Received: from pinnacle.lan (ovpn-116-121.phx2.redhat.com [10.3.116.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB5F283190; Tue, 28 Aug 2018 01:48:21 +0000 (UTC) Date: Tue, 28 Aug 2018 01:48:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH] Implement struct type_stack with a vector Message-ID: <20180827184820.2ed97736@pinnacle.lan> In-Reply-To: <1535404324-7683-1-git-send-email-simon.marchi@ericsson.com> References: <1535404324-7683-1-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00677.txt.bz2 On Mon, 27 Aug 2018 17:12:04 -0400 Simon Marchi 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) : Change type to > std::vector. > : 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