From patchwork Mon Aug 15 19:40:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1666581 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=af+GDufp; dkim-atps=neutral Received: from legolas.ozlabs.org (legolas.ozlabs.org [150.107.73.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M64Q82WTtz9s1l for ; Tue, 16 Aug 2022 05:40:48 +1000 (AEST) Received: by legolas.ozlabs.org (Postfix) id 4M64Q75Pydz1ygN; Tue, 16 Aug 2022 05:40:47 +1000 (AEST) Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=af+GDufp; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4M64Q64WjNz1ygF for ; Tue, 16 Aug 2022 05:40:44 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC0AE385841F for ; Mon, 15 Aug 2022 19:40:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC0AE385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1660592439; bh=4UG49Ykw/ZoV0qSIsGg9oCv1jVyCWRp7g7vZzDnuhNc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=af+GDufpfMNNWvCgKfZUb4Uo754uLIsNtLw/z2pS6ciujhaD7ZFTp3G0FrPmsYUr9 9jST5txYnoPiTiGcOc04Ouqas5WBwyRygBftgOaeYeFaS4BcniALJvN+Qk8i6+vDhA p4MwJZCA4quLDn7s5pYE8aC4WAXV2sQRtoGBNz5Y= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id 300553858C2F for ; Mon, 15 Aug 2022 19:40:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 300553858C2F Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4M64PS0dMvz9sSG; Mon, 15 Aug 2022 21:40:12 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [committed] d: Field names of anonymous delegates should be same as regular delegate types. Date: Mon, 15 Aug 2022 21:40:09 +0200 Message-Id: <20220815194009.2356082-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch adjusts the field names of delegate csts constructed inline. Doesn't change anything in the code generation or ABI, but makes it consistent with regular delegates as names would match up when inspecting tree dumps. Regression tested on x86_64-linux-gnu and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * d-codegen.cc (build_delegate_cst): Give anonymous delegate field names same as per ABI spec. --- gcc/d/d-codegen.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 3fd4bee58f6..d02da1f81e3 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -419,8 +419,8 @@ build_delegate_cst (tree method, tree object, Type *type) { /* Convert a function method into an anonymous delegate. */ ctype = make_struct_type ("delegate()", 2, - get_identifier ("object"), TREE_TYPE (object), - get_identifier ("func"), TREE_TYPE (method)); + get_identifier ("ptr"), TREE_TYPE (object), + get_identifier ("funcptr"), TREE_TYPE (method)); TYPE_DELEGATE (ctype) = 1; }