GNU bug report logs - #42147
28.0.50; pure vs side-effect-free, missing optimizations?

Previous Next

Package: emacs;

Reported by: Andrea Corallo <andrea_corallo <at> yahoo.it>

Date: Tue, 30 Jun 2020 22:28:02 UTC

Severity: normal

Found in version 28.0.50

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Mattias Engdegård <mattiase <at> acm.org>, Paul Eggert <eggert <at> cs.ucla.edu>, Andrea Corallo <andrea_corallo <at> yahoo.it>, 42147 <at> debbugs.gnu.org
Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?
Date: Sat, 25 Jul 2020 22:11:52 +0200
Am Sa., 25. Juli 2020 um 22:07 Uhr schrieb Stefan Monnier
<monnier <at> iro.umontreal.ca>:
>
> > That sounds like a very reasonable definition. Do you think it's
> > equivalent to my hypothesis and/or to the current behavior of the byte
> > optimizer?
>
> Probably not exactly: there might be functions which don't always
> "preserve `eql`" but for which we decide nevertheless that it's OK to
> precompute them at compile time for pragmatic reasons.
>
> E.g. `concat`.


I don't think we can really do that, as that would allow the byte
compiler to introduce bugs in the code, right? The manual states that
"This function [concat] always constructs a new string that is not
‘eq’ to any existing string" so I don't see how it could ever be pure.




This bug report was last modified 4 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.