From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86782 invoked by alias); 17 Sep 2018 18:04:17 -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 86765 invoked by uid 89); 17 Sep 2018 18:04:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=evaluation, H*r:sk:mail-he X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0042.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 18:04:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=25TR7IJZqN8aGIuhwKVgfRGtn6FN1xoLfBaP9YGYmVg=; b=jWiEiP1hIpDf27DlOzYbWbDX3fkMNRDLNyRQVGLjItwriN16EEi+qKnWVdlvsJ5GLaXDVMaK4Jx5i5jEMksvGYGdKYHNXon4gxc8Co1glWSxcRREpMgUfDGzbefWiu4cAJWv+wHnzBC484RQ8ZQM7+Of3+fp7HM5nrAArOb42FY= Received: from [10.32.36.144] (217.140.106.40) by DB7PR08MB3194.eurprd08.prod.outlook.com (2603:10a6:5:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Mon, 17 Sep 2018 18:04:09 +0000 Subject: Re: [PATCH v2] Logical short circuiting with argument lists To: Tom Tromey Cc: gdb-patches@sourceware.org, nd@arm.com References: <79494820-f795-ad3c-8546-0ad288cd05b0@arm.com> <87mustueua.fsf@tromey.com> <2fd31db3-e0f7-262b-6b30-bd7a78cbabbf@arm.com> <87pnxjj688.fsf@tromey.com> From: Richard Bunt Message-ID: <6bf0f4b1-4259-6fe0-f77e-4e3cdb783f65@arm.com> Date: Mon, 17 Sep 2018 18:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87pnxjj688.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: richard.bunt@arm.com Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Richard.Bunt@arm.com; X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00591.txt.bz2 On 09/12/2018 12:38 PM, Tom Tromey wrote: >>>>>> "Rich" == Rich Bunt writes: > >>> Though, another option is to do this in a fortran-specific way. > > Rich> Are you able to provide some more details on this approach please? > > Sure. Each language provides its own evaluation function. These > functions can change the interpretation -- or even, in collusion with > the language's expression parser the layout in memory -- of a given > opcode. Most languages just defer to the generic evaluator. > > E.g., look at rust-lang.c:rust_evaluate_subexp. It changes UNOP_IND to > handle Rust trait objects, among other things. > > Fortran doesn't have one of these as f_language_defn refers to > exp_descriptor_standard. > > The whole expression data structure and approach is bad and should be > rewritten. > > Anyway, doing this may be overkill, unless we think of some downside to > your approach. Thanks for this. It's good to know this is an option as I work through other Fortran additions. Rich.