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 13:56:39 +0000 (UTC) Message-ID: <705260433.2731607.1593698199171@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> 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="30173"; 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 15:57:10 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 1jqziA-0007i1-Hk for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 15:57:10 +0200 Original-Received: from localhost ([::1]:39954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqzi9-0006Lc-4o for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jul 2020 09:57:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqzi2-0006LQ-Mc for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 09:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqzi2-00046B-Cy for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 09:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqzi2-000861-9G for bug-gnu-emacs@gnu.org; Thu, 02 Jul 2020 09:57: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 13:57: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.159369821331104 (code B ref 42147); Thu, 02 Jul 2020 13:57:02 +0000 Original-Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 13:56:53 +0000 Original-Received: from localhost ([127.0.0.1]:55478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqzht-00085b-3k for submit@debbugs.gnu.org; Thu, 02 Jul 2020 09:56:53 -0400 Original-Received: from sonic311-30.consmr.mail.ir2.yahoo.com ([77.238.176.162]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqzhq-00085M-AO for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 09:56:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593698202; bh=fUvvMKvzwKzvzDDaa81e3GoKFcUHzUkZWHr+FezFWU8=; h=Date:From:To:Cc:In-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Vc4yjBNcRi0Tetd_IPdRMecBkvNnq3z2Xg9sJzlBt0hveye6q3us_rfD2d LZCcDTmOJfeCY7cSivnDZQ4Rwgy7nZx6eTi3qBH8YWVYXOU8D8oAzy0PAe3FQFsRdcjk5BQi9b4z 8NMi2C6nkZXl86t0BJ1SkZ1knSnHMiowIU0x81SJ0R Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ir2.yahoo.com with HTTP; Thu, 2 Jul 2020 13:56:42 +0000 In-Reply-To: <5F2B4684-34D1-4474-8909-9F435369FE54@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:182634 Archived-At: Mattias Engdeg=C3=A5rd writes: > 2 juli 2020 kl. 12.59 skrev Andrea Corallo : > >>> I still wonder if there is any reason to limit arithmetic constant >>> folding to the portable fixnum range. Given that we don't evaluate >>> fixnump or bignump at compile-time, what observable effects would >>> constant-folding, say, (ash 1 32) have? Advice from deeper thinkers >>> solicited! >> >> I always thought the general idea is to respect the allocation side >> effect we have creating a bignum.=C2=A0 Not sure if the class of example= you >> have in mind here fits this case. > > Number allocation isn't a semantically visible effect and we probably > don't want to change that. Well is cons allocation a semantically visible effect then?=C2=A0 How is it different? 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 :) =C2=A0 Andrea