From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: cl-byte-compile-compiler-macro Date: Wed, 05 Apr 2006 21:39:17 +0200 Message-ID: <85acaz24nu.fsf@lola.goethe.zz> References: <1t3bh8soqw.fsf@fencepost.gnu.org> <2wacbf6xt1.fsf@fencepost.gnu.org> <87ek0olk4t.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1144266028 11162 80.91.229.2 (5 Apr 2006 19:40:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Apr 2006 19:40:28 +0000 (UTC) Cc: Andreas Schwab , emacs-devel@gnu.org, rms@gnu.org, rgm@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 05 21:40:26 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FRDrV-0004oU-3i for ged-emacs-devel@m.gmane.org; Wed, 05 Apr 2006 21:40:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FRDrU-0001Cu-Hh for ged-emacs-devel@m.gmane.org; Wed, 05 Apr 2006 15:40:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FRDrF-0001Cb-KN for emacs-devel@gnu.org; Wed, 05 Apr 2006 15:40:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FRDrE-0001C9-VV for emacs-devel@gnu.org; Wed, 05 Apr 2006 15:40:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FRDrE-0001C3-OV for emacs-devel@gnu.org; Wed, 05 Apr 2006 15:40:00 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FRDuo-0001RH-2F for emacs-devel@gnu.org; Wed, 05 Apr 2006 15:43:42 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FRDqo-0000bV-6u; Wed, 05 Apr 2006 15:39:34 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 9D7F31C3DB49; Wed, 5 Apr 2006 21:39:17 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Wed, 05 Apr 2006 15:32:18 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52452 Archived-At: Stefan Monnier writes: >>> When I compile quux.el, does that need CL to be loaded? >>> (Assume quux.el does not load CL itself.) > >> I think it does, since the accessor function has a byte-compile property >> that points to function in cl-macs (cl-byte-compile-compiler-macro). > >> I think it should be possible to compile quux.el without loading CL. > >> I proposed moving that function and its subroutine to subr.el. >> Will that achieve the goal? > > An alternative solution might be the following which just ignores the > cl-byte-compile-compiler-macro value unless that function is indeed defined. > Since compiler-macros are supposed to only provide optimizations but no > change in semantics, no running them should always be harmless. > Please install it if you think it's right. Uh, what? Am I just confused about the terminology you use? defmacro most certainly does not provide optional stuff to the compiler. defsubst would, but is the result of that called a "compiler macro" while the result of "defmacro" isn't? Anyway, I don't even think that a defsubst which might or might not be executed is a good idea: if the programmer wants to achieve a certain effect with an optimization, failing to do so should not go unnoticed. It appears that the current behavior makes it hard to track down the problem. I think the solution should be to create better diagnostics for pinpointing the problem instead of removing them completely. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum