From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Date: Thu, 2 Jul 2020 15:32:48 +0000 (UTC) Message-ID: <914228346.2847475.1593703968254@mail.yahoo.com> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6003"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 02 17:38:13 2020 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 1jr1Hw-0001RY-Of for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 17:38:12 +0200 Original-Received: from localhost ([::1]:59430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr1Hv-0003Gl-NE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 11:38:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr1Cw-0001cn-UG for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 11:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jr1Cw-0007Yo-Jr for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 11:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jr1Cw-0001xj-GY for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 11:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs Original-Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15937039797535 (code B ref 42147); Thu, 02 Jul 2020 15:33:02 +0000 Original-Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 15:32:59 +0000 Original-Received: from localhost ([127.0.0.1]:55522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr1Ct-0001xS-N7 for submit@debbugs.gnu.org; Thu, 02 Jul 2020 11:32:59 -0400 Original-Received: from sonic303-20.consmr.mail.ir2.yahoo.com ([77.238.178.201]:44458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr1Cp-0001xB-Bh for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 11:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it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JGNX..PiXWP4wk8st8w3zmqbf5frh3OuGAy9q4y7GUYpqfp6WNeBZ yEWcb08I0srFRi3PVIOojwtZ33sMaMH3PBCx5WkOtjRyiQZa9lqy7ec4vU66LicKzlXcn4bEeQHf lQUUxAS.MqD4dWsiCmkrESD7PnMfykVCD6_BYmJ.jqg24Uy0dN2MopQrnVSc1k4SCWFgDn66kNdV X7euh35vV6zmXREdY26AQQ7Y.JVTj4KO_cKMm4F4eD Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Thu, 2 Jul 2020 15:32:48 +0000 In-Reply-To: <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 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" Xref: news.gmane.io gmane.emacs.bugs:182638 Archived-At: Mattias Engdeg=C3=A5rd writes: >> I thought the reason why cons is not constant folded is to respect the >> allocation side effect, at least that's what I convinced my-self of :) > > Yes, in the sense that > >=C2=A0 (defun f () (cons 'a 'b)) > > produces a fresh (a . b) each time (f) is called, because the returned > values can be distinguished both explicitly by 'eq' and by mutating it > and observing whether the change affects previously returned values or > not. Neither works for numbers. Understand makes perfectly sense.=C2=A0 Cons allocation is something very visible in Lisp. =C2=A0 Andrea