From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28150 invoked by alias); 26 Jul 2013 17:08:15 -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 28100 invoked by uid 89); 26 Jul 2013 17:08:14 -0000 X-Spam-SWARE-Status: No, score=-7.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 26 Jul 2013 17:08:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6QH86xK020089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 26 Jul 2013 13:08:06 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6QH83UM030183; Fri, 26 Jul 2013 13:08:04 -0400 Message-ID: <51F2ACF3.1000902@redhat.com> Date: Fri, 26 Jul 2013 17:08:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: Andrew Burgess , gdb-patches@sourceware.org Subject: Re: [PATCH] ada-lang.c:coerce_unspec_val_to_type: Preserve laziness. References: <20130704182244.16683.55719.stgit@brno.lan> <51D6A00A.2050803@broadcom.com> <51D6A2CE.7080502@redhat.com> <87mwpugwxy.fsf@fleche.redhat.com> In-Reply-To: <87mwpugwxy.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00644.txt.bz2 On 07/10/2013 06:13 PM, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> That works, but I had originally discarded such an approach > Pedro> because it looked brittle to me. E.g., I was toying with optimizing > Pedro> value_optimized_out by only fetching lazy values if it really can't > Pedro> avoid it, and such a change would render this subtly broken. > > This code in ada-lang.c and similar code elsewhere always seems to me to > be a call for a new value copy-constructor that takes a type argument. > Then any necessary wackiness can be isolated in value.c. Yeah! The deprecated_set_value_type calls have tended to morph into things like that. I had actually started out with something like that, noticing that this Ada code is like a reinterpret cast. I did something based on refactoring value_copy, but wasn't getting happy with the results (or rather, the time it was taking me), so I gave up. But I'd definitely support it if someone went along those lines. -- Pedro Alves