From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19752 invoked by alias); 9 Dec 2008 10:55:10 -0000 Received: (qmail 19744 invoked by uid 22791); 9 Dec 2008 10:55:10 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Dec 2008 10:54:35 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 688252A9682; Tue, 9 Dec 2008 05:54:33 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 80k0q-TenXE8; Tue, 9 Dec 2008 05:54:33 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2FDB22A9680; Tue, 9 Dec 2008 05:54:33 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id E1EF6E7ACD; Tue, 9 Dec 2008 11:54:30 +0100 (CET) Date: Tue, 09 Dec 2008 10:55:00 -0000 From: Joel Brobecker To: Jerome Guitton Cc: gdb-patches@sourceware.org Subject: Re: [RFA/Ada] remove ref to fields and ref to slices Message-ID: <20081209105430.GN3823@adacore.com> References: <20081127100443.GA64300@adacore.com> <20081208233013.GJ3823@adacore.com> <20081209100418.GI52346@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081209100418.GI52346@adacore.com> User-Agent: Mutt/1.4.2.2i 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 X-SW-Source: 2008-12/txt/msg00168.txt.bz2 > Not really. ada_value_slice already exists: same function, but it works > on array. ada_value_slice_ptr, at the contrary, works on pointers to > array or references. Maybe ada_value_slice_from_ptr would be clearer? Rats! I'm looking at the code, and I am thinking that there is a bit of simplification that we could look at, now that the contents of lazy values is allocated later. For instance: ada_coerce_to_simple_array_ptr vs ada_coerce_to_simple_array If we got rid of ada_coerce_to_simple_array_ptr, then we probably wouldn't need ada_value_slice_ptr.. But in the meantime, I do think that ada_value_slice_from_ptr is clearer. Thanks, -- Joel