From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3838 invoked by alias); 26 Nov 2008 16:30:26 -0000 Received: (qmail 3820 invoked by uid 22791); 26 Nov 2008 16:30:21 -0000 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Nov 2008 16:29:46 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id B1A0629000A; Wed, 26 Nov 2008 17:29:43 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tcr9mPo8cpAJ; Wed, 26 Nov 2008 17:29:42 +0100 (CET) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id DA8E2290005; Wed, 26 Nov 2008 17:29:42 +0100 (CET) Received: by province.act-europe.fr (Postfix, from userid 560) id CF5C9165B35; Wed, 26 Nov 2008 17:29:42 +0100 (CET) Date: Thu, 27 Nov 2008 10:05:00 -0000 From: Jerome Guitton To: Joel Brobecker Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA] "lazily" allocate the raw content of lazy values Message-ID: <20081126162942.GL12079@adacore.com> References: <20081124144810.GA90681@adacore.com> <20081125112638.GE61928@adacore.com> <20081125165319.GA12079@adacore.com> <20081125172307.GD3946@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081125172307.GD3946@adacore.com> User-Agent: Mutt/1.5.17 (2007-11-01) 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-11/txt/msg00717.txt.bz2 Joel Brobecker (brobecker@adacore.com): > > 2008-11-25 Jerome Guitton > > > > * value.h (allocate_value_lazy): New function declaration. > > (value_free): Remove macro, make it a function. > > * value.c (value): Move actual content outside of the memory space > > of the struct; add a pointer to this actual content. > > (allocate_value_lazy, allocate_value_contents): New function. > > (allocate_value): Reimplement using these two new functions. > > (value_contents_raw, value_contents_all_raw): If no memory > > has been allocated yet for the actual content, allocate it. > > (value_contents_all): Resync with struct value's changes. > > (value_free): New function. > > (value_copy, value_primitive_field): Use new function > > allocate_value_lazy to allocate lazy values. > > (value_change_enclosing_type): Resync with struct value's changes. > > As the value is not reallocated, remove the special handling for > > the value chain (now obsolete). > > * valops.c (value_at_lazy): Use new function allocate_value_lazy. > > (value_fetch_lazy): Allocate value content. Use allocate_value_lazy > > to allocate lazy values. > > (value_slice): Use allocate_value_lazy to allocate lazy values. > > Pre-approved after the following minor nits are fixed. Minor nits fixed, now commited. Thank you both, Jerome