unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Vibhav Pant <vibhavp@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 60974 <60974@debbugs.gnu.org>
Subject: bug#60974: 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies
Date: Thu, 02 Feb 2023 18:45:56 +0530	[thread overview]
Message-ID: <bc09949487f99630f5c18c81476db9f28a04ebcb.camel@gmail.com> (raw)
In-Reply-To: <0883890C-6FB6-4501-867A-6684CBA3D9F4@acm.org>

[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]

On Thu, 2023-02-02 at 13:39 +0100, Mattias Engdegård wrote:
> [ trimmed emacs-devel ]
> 
> 2 feb. 2023 kl. 13.35 skrev Vibhav Pant <vibhavp@gmail.com>:
> 
> > Sure. Do we need to install this to the release branch? The bug
> > doesn't
> > really break anything AFAIK, so I dont think it's really a release
> > blocker.
> 
> In any case there should be a test. (Not implying that you needed to
> be reminded, of course.)
> 

I had thought of adding a test a while back, but I'm not sure how we'd
do it. The immutability of self evaluating literals is only enforced
for data in purespace. One potential way to achieve this would be a
test-case that depends on a macro defined in purespace, which expands
to a body that is not byte-compiled, but that doesn't sound like a
great approach.

Alternatively, we could define a macro, store its expanded form in a
variable and run it through `cconv-closure-convert`, checking
afterwards whether the original value changed or not. It feels a little
more reliable, but writing it might be a little tricky.

(Shameless plug for scratch/comp-static-data, which does enforce
immutability in natively compiled code, and has new tests that check
for exactly this).

-- 
Vibhav Pant
vibhavp@gmail.com
GPG: 7ED1 D48C 513C A024 BE3A  785F E3FB 28CB 6AB5 9598

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-02-02 13:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 21:24 bug#60974: 30.0.50; byte-compile-preprocess mutates self evaluating forms in expanded macro bodies Vibhav Pant
2023-01-20 21:35 ` Vibhav Pant
2023-01-21  5:43   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-27 12:44     ` Vibhav Pant
2023-01-28 23:10       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-31 13:52         ` Vibhav Pant
2023-01-31 14:34           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-01  7:41             ` Vibhav Pant
     [not found]             ` <22ab766cb75ceedac14976e02aebe02711ef6aad.camel@gmail.com>
2023-02-01 14:33               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-02 12:35                 ` Vibhav Pant
     [not found]                 ` <51cc5308368f09c02a315970275bd3968008c421.camel@gmail.com>
2023-02-02 12:39                   ` Mattias Engdegård
2023-02-02 13:15                     ` Vibhav Pant [this message]
2023-02-02 16:04                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-07 13:02                         ` Vibhav Pant
2023-02-02 14:26                   ` Eli Zaretskii
2023-01-20 21:36 ` bug#60974: [PATCH] " Vibhav Pant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc09949487f99630f5c18c81476db9f28a04ebcb.camel@gmail.com \
    --to=vibhavp@gmail.com \
    --cc=60974@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).