all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
	acm@muc.de, Eli Zaretskii <eliz@gnu.org>,
	Andrea Corallo <acorallo@gnu.org>,
	71934@debbugs.gnu.org
Subject: bug#71934: comp--spill-lap-function and closure (wad: bug#71934: 31.0.50; edebug--called-interactively-skip vs. new fun objects)
Date: Fri, 5 Jul 2024 21:41:25 +0000	[thread overview]
Message-ID: <ZohohZGpcOPTJwKR@ACM> (raw)
In-Reply-To: <jwv5xtjd2do.fsf-monnier+emacs@gnu.org>

Hello, Stefan.

On Fri, Jul 05, 2024 at 16:26:02 -0400, Stefan Monnier wrote:
> >> (closure ...) is not a function symbol nor a valid form.  Instead it's
> >> a function value and the docstring doesn't say such are
> >> a valid arguments to `native-compile`.

> > All very clever arguments, no doubt, but in the end it means you cannot
> > native compile foo.

> To obey the docstring, ....

Forget that doc string, just do what is right, expected, and convenient
for Emacs users, and adjust the doc string afterwards.

> > I've just tried it on emacs-30, and it doesn't work.

> As it is allowed to, according to its docstring.

Forget that doc string.  It belongs to lawyers, not reality.

> > But you could compile foo last summer after my fixes for bug #64646.

> [ But that still failed to make it work for byte-compiled function values,
>   and it failed to update the docstring to announce that new behavior.  ]

That is a strawman.  You have never been able to compile from
byte-compiled code to native compiled code, and never will (unless
Andrea has anything new to the contrary to say).  

The point is being able to compile foo, from read source code.  You
don't want to be able to do this for reasons I can't fathom.

> >> Admittedly, maybe we should extend `native-compile` to accept function
> >> values, just like `byte-compile`.
> > Or something like that, yes.  But if logical combinations of terms like
> > "form", "closure", "function value", "valid form" lead to not being able
> > to compile foo, then I suggest that these terms and their applicability
> > might need to be thought through somewhat.

> Don't worry: they've been thought through aplenty.

Clearly not.  The confusion they're apparently causing is affecting Emacs.

> >>> So I fixed comp--spill-lap-function (form version) so as to compile
> >>> that form.
> >> Why `comp--spill-lap-function` specifically (instead of
> >> `native-compile`, for example)?
> > I fixed what was wrong at the time.

> I'd like to implement the feature of `native-compile` accepting function
> values correctly rather than in the most expedient way.  If you could
> try to remember why you fixed it in this specific way, ....

I have no records of my reasons.  Having diagnosed the problem, it was
not difficult to fix.  I just fixed it in the simplest, most obvious,
and most obviously correct way.

> .... that would be very helpful, because I'm not sufficiently familiar
> with the code of `comp--spill-lap-function` to be sure of what I'm
> doing.

> >> > I've no idea how Emacs would handle that defconst now.
> >> Hmm... AFAICT your example doesn't relate to `defconst`.
> >> You'd get the same result with
> >>     M-: (native-compile (lambda (baz) (car baz))) RET
> > Whatever.  foo doesn't compile; that should be fixed.

> All I'm saying is that it's a feature request, rather than a bug to
> be fixed.

Functionality has been lost.  Finding an excuse in the exact meaning of
words rarely used with such precision is not a way to restore that
functionality.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2024-07-05 21:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04  5:11 bug#71934: 31.0.50; edebug--called-interactively-skip vs. new fun objects Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 13:08 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-04 15:47   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-05  4:00     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-05  4:24       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-05  5:06         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-05  5:48           ` Eli Zaretskii
2024-07-05  8:46             ` Andrea Corallo
     [not found]               ` <jwvtth4c7f3.fsf-monnier+emacs@gnu.org>
     [not found]                 ` <Zof2edaqLQfHD4_B@ACM>
     [not found]                   ` <jwvbk3b970b.fsf-monnier+emacs@gnu.org>
2024-07-05 16:48                     ` bug#71934: comp--spill-lap-function and closure (wad: bug#71934: 31.0.50; edebug--called-interactively-skip vs. new fun objects) Alan Mackenzie
2024-07-05 18:17                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-05 19:55                         ` Alan Mackenzie
2024-07-05 20:26                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-05 21:41                             ` Alan Mackenzie [this message]
2024-07-06  1:06                               ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06  6:36                                 ` Eli Zaretskii
2024-07-06  8:06                                   ` Andrea Corallo
2024-07-06 14:27                                 ` Alan Mackenzie
2024-07-08  1:35                                   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08  2:32                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08  8:47                                       ` Andrea Corallo
2024-07-08 10:18                                     ` Alan Mackenzie
2024-07-09  5:19                                       ` bug#71934: 31.0.50; edebug--called-interactively-skip vs. new fun objects Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-06  7:48                           ` bug#71934: comp--spill-lap-function and closure (wad: bug#71934: 31.0.50; edebug--called-interactively-skip vs. new fun objects) Andrea Corallo
2024-07-06 11:01                             ` Alan Mackenzie
2024-07-06 17:29                               ` Andrea Corallo
2024-07-09 20:49                                 ` Andrea Corallo
2024-07-10 10:29                                   ` Alan Mackenzie
2024-07-10 11:28                                     ` Andrea Corallo
2024-07-06  7:33                       ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZohohZGpcOPTJwKR@ACM \
    --to=acm@muc.de \
    --cc=71934@debbugs.gnu.org \
    --cc=acorallo@gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.