From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#40968: 28.0.50; (apply nil) Date: Thu, 7 May 2020 15:53:42 +0200 Message-ID: <6ADF0807-7EBD-4054-8579-4D9AD3065D51@acm.org> References: <874kssm04d.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="97336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , 40968@debbugs.gnu.org, Pip Cet To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 07 15:57:54 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 1jWh2A-000PD4-Bj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 May 2020 15:57:54 +0200 Original-Received: from localhost ([::1]:38994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWh29-0001OC-DQ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 May 2020 09:57:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWgzO-0004si-5P for bug-gnu-emacs@gnu.org; Thu, 07 May 2020 09:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWgzN-0005dS-PI for bug-gnu-emacs@gnu.org; Thu, 07 May 2020 09:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWgzN-0008Ed-Lw for bug-gnu-emacs@gnu.org; Thu, 07 May 2020 09:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 May 2020 13:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40968 X-GNU-PR-Package: emacs Original-Received: via spool by 40968-submit@debbugs.gnu.org id=B40968.158885965031563 (code B ref 40968); Thu, 07 May 2020 13:55:01 +0000 Original-Received: (at 40968) by debbugs.gnu.org; 7 May 2020 13:54:10 +0000 Original-Received: from localhost ([127.0.0.1]:42434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWgyJ-0008CS-Gm for submit@debbugs.gnu.org; Thu, 07 May 2020 09:54:10 -0400 Original-Received: from mail1441c50.megamailservers.eu ([91.136.14.41]:49020 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWgyG-0008C4-SF for 40968@debbugs.gnu.org; Thu, 07 May 2020 09:53:54 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1588859626; bh=1hLdHjCfLRQ+efzPoQfYVHN0Ak7w1dBFMNTk11Qnb98=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=Lh6W98q2LvSAQxgkekbU17N+rqIbEVzTPDg/yA0YOSa6TTyrFv68K/kqrphBW5GKg 1AnDmOR9dnE1IiGRgCF0zI5FboGtFsOzIbwHbBLVJg65FXVU81BQafvN58VrDqCBOe 3HcWV1OUSmyhg9QRvOUK0rPfZNnr38zl8wu9jfps= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 047Drh4g017567; Thu, 7 May 2020 13:53:44 +0000 In-Reply-To: <874kssm04d.fsf@gmail.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F21.5EB4129A.008B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PPNxBsiC c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=Ju1UhzJ7G_x2rGT1ieEA:9 a=CjuIK1q_8ugA:10 a=bh93jhYcCVYJ-nYAWB4A:9 a=De_Ol2h6w80A:10 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:179884 Archived-At: --Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 7 maj 2020 kl. 13.54 skrev Noam Postavsky : > The obvious solution is just to leave the weird single arg form > unoptimized. Otherwise, what about your earlier suggestion? >=20 > (apply X) =3D=3D (apply (car X) (cdr X)) Yes, we are under no obligation to optimise this case in any way. > By the way, bytecomp-check-1 already ignores differences between error > types. So the test case doesn't need a condition-case at all if we > don't care about which particular error is signalled. It seems to treat all errors as producing the value nil, but that should = of course be fixed. --Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF Content-Disposition: attachment; filename=bytecomp-tests.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="bytecomp-tests.diff" Content-Transfer-Encoding: 7bit diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index bfe2d06a61..c235dd43fc 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -363,10 +363,10 @@ bytecomp-check-1 (byte-compile-warnings nil) (v0 (condition-case nil (eval pat) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (byte-compile (list 'lambda nil pat))) - (error nil)))) + (error 'bytecomp-check-error)))) (equal v0 v1))) (put 'bytecomp-check-1 'ert-explainer 'bytecomp-explain-1) @@ -374,10 +374,10 @@ bytecomp-check-1 (defun bytecomp-explain-1 (pat) (let ((v0 (condition-case nil (eval pat) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (byte-compile (list 'lambda nil pat))) - (error nil)))) + (error 'bytecomp-check-error)))) (format "Expression `%s' gives `%s' if directly evalled, `%s' if compiled." pat v0 v1))) @@ -402,10 +402,10 @@ test-byte-opt-arithmetic (dolist (pat byte-opt-testsuite-arith-data) (condition-case nil (setq v0 (eval pat)) - (error (setq v0 nil))) + (error (setq v0 'bytecomp-check-error))) (condition-case nil (setq v1 (funcall (byte-compile (list 'lambda nil pat)))) - (error (setq v1 nil))) + (error (setq v1 'bytecomp-check-error))) (insert (format "%s" pat)) (indent-to-column 65) (if (equal v0 v1) @@ -561,11 +561,11 @@ bytecomp-lexbind-check-1 (byte-compile-warnings nil) (v0 (condition-case nil (eval pat t) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (let ((lexical-binding t)) (byte-compile `(lambda nil ,pat)))) - (error nil)))) + (error 'bytecomp-check-error)))) (equal v0 v1))) (put 'bytecomp-lexbind-check-1 'ert-explainer 'bytecomp-lexbind-explain-1) @@ -573,11 +573,11 @@ bytecomp-lexbind-check-1 (defun bytecomp-lexbind-explain-1 (pat) (let ((v0 (condition-case nil (eval pat t) - (error nil))) + (error 'bytecomp-check-error))) (v1 (condition-case nil (funcall (let ((lexical-binding t)) (byte-compile (list 'lambda nil pat)))) - (error nil)))) + (error 'bytecomp-check-error)))) (format "Expression `%s' gives `%s' if directly evalled, `%s' if compiled." pat v0 v1))) --Apple-Mail=_46137A13-F783-4F26-8E16-DE07A852C1EF--