From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42483 invoked by alias); 6 Apr 2018 21:40:21 -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 42467 invoked by uid 89); 6 Apr 2018 21:40:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=nope X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.129) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Apr 2018 21:40:19 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 828EC134EE for ; Fri, 6 Apr 2018 16:40:18 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 4Z5mfyOOnQUwq4Z5mfmZZ6; Fri, 06 Apr 2018 16:40:18 -0500 Received: from 75-166-37-45.hlrn.qwest.net ([75.166.37.45]:47882 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1f4Z5m-003neW-A2; Fri, 06 Apr 2018 16:40:18 -0500 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 08/12] Remove value::next and value::released References: <20180405211507.6103-1-tom@tromey.com> <20180405211507.6103-9-tom@tromey.com> <84cd5331-e9ca-dc95-6c2e-a13cd64d7137@redhat.com> Date: Fri, 06 Apr 2018 21:40:00 -0000 In-Reply-To: <84cd5331-e9ca-dc95-6c2e-a13cd64d7137@redhat.com> (Pedro Alves's message of "Fri, 6 Apr 2018 20:32:02 +0100") Message-ID: <878ta03tfi.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1f4Z5m-003neW-A2 X-Source-Sender: 75-166-37-45.hlrn.qwest.net (bapiya) [75.166.37.45]:47882 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-04/txt/msg00107.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> On 04/05/2018 10:15 PM, Tom Tromey wrote: >> value_release_to_mark (const struct value *mark) >> { Pedro> ... >> + std::reverse (result.begin (), result.end ()); >> return result; >> } Pedro> Is there a comment somewhere mentioning the order of the Pedro> returned values? Nope. value.h doesn't generally seem to have comments; but since really it should, I've done this: /* Release values from the value chain and return them. Values created after MARK are released. If MARK is nullptr, or if MARK is not found on the value chain, then all values are released. Values are returned in reverse order of creation; that is, newest first. */ extern std::vector value_release_to_mark (const struct value *mark); Then in value.c I added the usual: /* See value.h. */ std::vector value_release_to_mark (const struct value *mark) { ... Tom