From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vibhav Pant Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: bug#60974: 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies Date: Tue, 31 Jan 2023 19:22:56 +0530 Message-ID: <2d72943db9995af6a98744f4a4da3cef98773b86.camel@gmail.com> References: <6eb5f27bf591c3d52766d8b9da46e7301f2ff0ab.camel@gmail.com> <5ccd0d1f9f64a5fd20e5403a07b06d6074b6c8f6.camel@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-MIUjJ0DaSpH+2NRrnury" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23416"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.46.3 Cc: 60974@debbugs.gnu.org, emacs-devel To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 15:36:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMrkC-0005uK-P5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 15:36:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMr5H-0005DX-W1; Tue, 31 Jan 2023 08:54:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMr5G-0005D6-Fb for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 08:54:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMr5G-0008TF-8A for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 08:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMr5F-0007lH-Qp for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 08:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vibhav Pant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2023 13:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60974 X-GNU-PR-Package: emacs Original-Received: via spool by 60974-submit@debbugs.gnu.org id=B60974.167517319329760 (code B ref 60974); Tue, 31 Jan 2023 13:54:01 +0000 Original-Received: (at 60974) by debbugs.gnu.org; 31 Jan 2023 13:53:13 +0000 Original-Received: from localhost ([127.0.0.1]:51876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMr4T-0007jv-9b for submit@debbugs.gnu.org; Tue, 31 Jan 2023 08:53:13 -0500 Original-Received: from mail-qt1-f182.google.com ([209.85.160.182]:38639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMr4Q-0007jc-Td for 60974@debbugs.gnu.org; Tue, 31 Jan 2023 08:53:12 -0500 Original-Received: by mail-qt1-f182.google.com with SMTP id z9so13304410qtv.5 for <60974@debbugs.gnu.org>; Tue, 31 Jan 2023 05:53:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:from:to:cc:subject:date:message-id:reply-to; bh=ErIB+/qCF28Ssd2R5mC0JBESa2g2LzWYTgVrVLaXxTs=; b=ViCIh853/LFb1iG3fbYZw3UYC2ILO1hpjKjDyq9mibPftJ8Zna3fYZ004uvcITln4N xJEnBEbTEchGJJDdLW0/QYH7z7wFZnt0VK619cc+471+Yj2NKrPgLcxPEWUSTRgmdo/v MK33lrJTHY45Ck3UWCBtt6FajdTM9svw3OEpDuwP55zG2WBDJOzPeZ4hQc55uSduZhFJ F5CflW7EovZFqzbSOe6Z/szqL/oFOCgt5CAKUqgZ17EKtTHpcvoLrZC0XhR6sN68do6o XF7uZG/ViqM1YxB7VM9T0wsz2QMehQMOHsAxi6dyYElN5X7LIKGtiqpIVCkum9sT0hIL DvKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ErIB+/qCF28Ssd2R5mC0JBESa2g2LzWYTgVrVLaXxTs=; b=Cm8ds0+zQSAKGUe31u9uViWpegxeUj7pEkEHkWbi5zxRfjuhjS43zo9Wm6eYT22tBf xTk2CExZT+UN4ULAYegIMfRfRdtv8yvycNP8qyRZjsnFW0k3tSaGsx7NGm5f/2HyKFDP 174dcDKY+AxC9ZNyta8nyU259QugY1nU/SfVBFNUrhDhE8ooXCFZvj7TCGo5KKEodi7a lVAwVf6SkOfZ0ZhJ+fUyZ4iY0kNadcBmFXzuRPcEqR13lWWi1k9BFzPlY5iA5lmkSnCq iOdeznkyRtNKereLROH1oAjL6IL+keCAm2AkactG6NtMztqzovlSOZmNuMpUccqsVN4p cUUQ== X-Gm-Message-State: AO0yUKV54gbpZue9VMwp/YD6EbpUmaOHIU3wp5FICdag1dCQ4iEpZ2XA /ZdkqKPUC0YSHLBa7Rh6BPg= X-Google-Smtp-Source: AK7set/bqsZawVJTZWf6VjEQvEi0H7C39VpDGq4M0XJ5PO8+jusrVQifdFXwhRt9JJza4QFDNCfB0g== X-Received: by 2002:a05:622a:199b:b0:3a7:f091:bfe with SMTP id u27-20020a05622a199b00b003a7f0910bfemr19753098qtc.7.1675173185275; Tue, 31 Jan 2023 05:53:05 -0800 (PST) Original-Received: from vibhavp-mbp.local ([182.69.182.68]) by smtp.gmail.com with ESMTPSA id z10-20020ac8710a000000b003b9b48cdbe8sm457701qto.58.2023.01.31.05.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 05:53:04 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254517 gmane.emacs.devel:302825 Archived-At: --=-MIUjJ0DaSpH+2NRrnury Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2023-01-28 at 18:10 -0500, Stefan Monnier wrote: > > Ah, right. Theother way I could think of a fix is setq-ing `form` > > to a > > shallow copy of the original form, with only the place(s) changed. > > This > > patch tries to do that by using `pcase-let` to destructure forms. >=20 > Hmm... yes, that's closer.=C2=A0 It's pretty ugly, tho. > Yet it's hard to make it less ugly here because the > `cconv-freevars-alist` really depends on `eq` equality. >=20 > Maybe we should pass `cif` to `cconv--convert-function` (or maybe > even > move most of that `cconv--interactive-form-funs`-handling to that > function) and arrange for that function to do the > "non-side-effecting-equivalent-of" (setf (cadr (car bf)) form)? >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Stefan >=20 I tried to shift the `cif` related bits to `cconc--convert-function`, but my understanding of cconv.el isn't that great, so I wasn't successful at doing that :(. Should I add a TODO to the change for the future? --=20 Vibhav Pant vibhavp@gmail.com GPG: 7ED1 D48C 513C A024 BE3A 785F E3FB 28CB 6AB5 9598 --=-MIUjJ0DaSpH+2NRrnury Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEftHUjFE8oCS+Onhf4/soy2q1lZgFAmPZHTgACgkQ4/soy2q1 lZh3bQgAkxA3I/EjbjUGnRCe/i9txBTRnhqLC3ZWuVLT8MJN9ziute2XmHYcac3Q nDjNE9B7dqbZbrAEqPBvbO9oCqpCLwhHoxrKwWFhdXPqBp7K6KPq2re7hJaRcZLv o1eTgCzTh/0v67jNceDa5S39nNf5hV/WY/sBZHQ1bWTfUh3uU9CtZJ+CBZ+1WcC8 pT6S2/owkKX7PymT02S40aWqDyHglWDa4wqJ8SDrPM/V36lODqjKeSMVI46MCpYJ LkxefY+NbW5O6uPst9auZEpXh4ZzO4UcEslHkDBPdcFwQ28CPsoRB7+cy0335vei Fj3oIDiiv1/qKUxihKZDVepWM69CGg== =8FO0 -----END PGP SIGNATURE----- --=-MIUjJ0DaSpH+2NRrnury--