From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta037.useast.a.cloudfilter.net (omta037.useast.a.cloudfilter.net [44.202.169.36]) by sourceware.org (Postfix) with ESMTPS id 69CD13858C33 for ; Sat, 19 Aug 2023 19:24:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 69CD13858C33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTP id XMZ5qlhBuWU1cXRYbq6C7Y; Sat, 19 Aug 2023 19:24:21 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id XRYaqDQ9DL7aTXRYaqjkgH; Sat, 19 Aug 2023 19:24:21 +0000 X-Authority-Analysis: v=2.4 cv=RMqgoqu+ c=1 sm=1 tr=0 ts=64e116e5 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=UttIx32zK-AA:10 a=Qbun_eYptAEA:10 a=eERoDeoBky8xc0Q4DvwA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=7Yx4/FkE+Vs8pqP2PxZH4iAx3FfCoTjMYJL5lxefMWQ=; b=L+n+85m9aSEV3kZs7GdW3lMCQF PEi7y5dF3wfQ1yNzCxahAlALsnDXGOAcLrEmOmzZsXTzLkoM+vvRSC2ZXdVbRyPmlUtOSa/yTM18s 5smgq0PrOM6Txwwz5i9Ipm84E; Received: from 75-166-142-177.hlrn.qwest.net ([75.166.142.177]:36658 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qXQ4V-003yFg-2u; Sat, 19 Aug 2023 11:49:12 -0600 From: Tom Tromey To: cgen@sourceware.org Cc: Tom Tromey Subject: [RFC 07/14] Use define-macro in rtl.scm Date: Sat, 19 Aug 2023 11:42:06 -0600 Message-ID: <20230819174900.866436-8-tom@tromey.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230819174900.866436-1-tom@tromey.com> References: <20230819174900.866436-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.142.177 X-Source-L: No X-Exim-ID: 1qXQ4V-003yFg-2u X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-142-177.hlrn.qwest.net (localhost.localdomain) [75.166.142.177]:36658 X-Source-Auth: tom+tromey.com X-Email-Count: 0 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPyGmGQ2Ryvvb0iHTKKGhhh/+hM0iAhcKUCYqMbXvGvxSfA87ybtws8gddmXgK86MVY/APSly9acQnx6KHJKCdjjaKmZDnLi3pWLIN0U1pN336DYn6Ct ccf17JlA18al3sq4KTxaFWQ/TMPwPGLdpcZPPxZNGgbWZFNElGWbtnl8oh4sH6MIU66ZfK1u56ov9Q== X-Spam-Status: No, score=-3024.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,JMQ_SPF_NEUTRAL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: rtl.scm uses defmacro:syntax-transformer, but that no longer exists in more recent versions of Guile. Replace these uses with define-macro -- which IMO is clearer anyway. Note that defmacro could not be used here, as Guile's implementation has a bug that prevents it from being used with non-canonical lists. --- rtl.scm | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/rtl.scm b/rtl.scm index c74fea1..beda406 100644 --- a/rtl.scm +++ b/rtl.scm @@ -283,12 +283,9 @@ *UNSPECIFIED*)) ) -(define define-rtx-node - ; Written this way so Hobbit can handle it. - (defmacro:syntax-transformer (lambda arg-list - (apply def-rtx-node arg-list) - nil)) -) +(define-macro (define-rtx-node . args) + (cons 'def-rtx-node + (map (lambda (arg) `',arg) args))) ; Same as define-rtx-node but don't pre-evaluate the arguments. ; Remember that `mode' must be the first argument. @@ -314,12 +311,9 @@ *UNSPECIFIED*)) ) -(define define-rtx-syntax-node - ; Written this way so Hobbit can handle it. - (defmacro:syntax-transformer (lambda arg-list - (apply def-rtx-syntax-node arg-list) - nil)) -) +(define-macro (define-rtx-syntax-node . args) + (cons 'def-rtx-syntax-node + (map (lambda (arg) `',arg) args))) ; Same as define-rtx-node but return an operand (usually an object). ; ??? `mode' must be the first argument? @@ -345,12 +339,9 @@ *UNSPECIFIED*)) ) -(define define-rtx-operand-node - ; Written this way so Hobbit can handle it. - (defmacro:syntax-transformer (lambda arg-list - (apply def-rtx-operand-node arg-list) - nil)) -) +(define-macro (define-rtx-operand-node . args) + (cons 'def-rtx-operand-node + (map (lambda (arg) `',arg) args))) ; Convert one rtx expression into another. ; NAME-ARGS is a list of the operation name and arguments. @@ -374,12 +365,10 @@ *UNSPECIFIED*)) ) -(define define-rtx-macro-node - ; Written this way so Hobbit can handle it. - (defmacro:syntax-transformer (lambda arg-list - (apply def-rtx-macro-node arg-list) - nil)) -) +(define-macro (define-rtx-macro-node . args) + (cons 'def-rtx-macro-node + (map (lambda (arg) `',arg) args))) + ; RTL macro expansion. ; RTL macros are different than pmacros. The difference is that the expansion -- 2.41.0