From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS Date: Sat, 1 Dec 2012 18:18:04 -0800 Message-ID: <8B94F420D989475D8089DCF31ECF8EAC@us.oracle.com> References: <4A0D4F56F5644FECA0E1476F42EA84E8@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354414740 15606 80.91.229.3 (2 Dec 2012 02:19:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2012 02:19:00 +0000 (UTC) Cc: 13052@debbugs.gnu.org To: "'Juanma Barranquero'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 02 03:19:12 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tez94-0006QR-Um for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Dec 2012 03:19:03 +0100 Original-Received: from localhost ([::1]:52943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tez8t-0007NR-8n for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Dec 2012 21:18:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tez8r-0007NK-0s for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 21:18:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tez8p-0005YZ-TU for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 21:18:48 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tez8p-0005YV-Q9 for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 21:18:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TezAz-0005d6-Oi for bug-gnu-emacs@gnu.org; Sat, 01 Dec 2012 21:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Dec 2012 02:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13052 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13052-submit@debbugs.gnu.org id=B13052.135441483321606 (code B ref 13052); Sun, 02 Dec 2012 02:21:01 +0000 Original-Received: (at 13052) by debbugs.gnu.org; 2 Dec 2012 02:20:33 +0000 Original-Received: from localhost ([127.0.0.1]:48985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TezAW-0005cR-P9 for submit@debbugs.gnu.org; Sat, 01 Dec 2012 21:20:33 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:41630) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TezAT-0005cI-Qx for 13052@debbugs.gnu.org; Sat, 01 Dec 2012 21:20:30 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qB22IDs1030625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 2 Dec 2012 02:18:14 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qB22IDnY006259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Dec 2012 02:18:13 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qB22ICqJ005528; Sat, 1 Dec 2012 20:18:12 -0600 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 01 Dec 2012 18:18:12 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3QL7o5mqF2bPrlTlujW0iS94nOVQAAcHzw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:67755 Archived-At: > It's not related to pure storage, but to whether the function is > "pure" (without side effecs). If the function is pure and the > arguments satisfy `macroexp-const-p' it is possible to do some > optimization during byte-compilation. See lisp/emacs-lisp/byte-opt.el, > around line 560 or so. Thanks. So I guess that means that if I have a similar (e.g., identical, for discussion) function and I put property `pure' on it then I will get the same optimization? I was thinking this had something to do with pure storage, so it would do no good to add that property to code I write. Is the only requirement that the function have no side effects and each of its arguments satisfies `macroexp-const-p'? What happens if someone erroneously adds that property to a function that is not pure but whose args all satisfy `macroexp-const-p'? Do you just lose the optimization or could something much worse happen? Looking at the byte-opt.el code briefly, it looks like the byte code would be incorrect. It looks as if adding non-nil property `pure' is a pretty strong declaration to the compiler, not just a hint, and it could have bad results if applied in the wrong place. Am I reading that right? In any case, this property should be documented.