unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64642: 29.0.92; Native compiler doesn't compile dynamically bound functions.
@ 2023-07-15  9:38 Alan Mackenzie
  2023-07-15  9:53 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Mackenzie @ 2023-07-15  9:38 UTC (permalink / raw)
  To: 64642

Hello, Emacs.

In the Emacs 29 pretest version (or the master version):
(i) emacs -Q
(ii) C-x b foo.el <RET>
(iii) M-x emacs-lisp-mode <RET>
Don't set lexical-binding in this buffer.
(iv) Enter a function called foo:
    (defun foo () "foo doc string"
      (lambda (bar) "lambda doc string" (car bar)))
(v) With point after the function, evaluate it with C-x C-e.

(vi) M-: (native-compile 'foo)
This signals an error, native-compiler-error-dyn-func.  This is a bug.

#########################################################################

The immediate cause of the bug is in the version of
comp-spill-lap-function which processes named functions (comp.el).
Unlike the other version of the cl-defmethod (which processes lambda
functions), there is no code for dynamic functions here.

If the intention is not to process dynamic functions, this should be
indicated by an error message rather than a signal.  Personally, I feel
that dynamic functions ought to be handled in Emacs-29.

Fixing this bug should be relatively straightforward, since it should
only involve copying and adapting the corresponding code in the lambda
version of comp-spill-lap-function.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-19 11:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-15  9:38 bug#64642: 29.0.92; Native compiler doesn't compile dynamically bound functions Alan Mackenzie
2023-07-15  9:53 ` Eli Zaretskii
2023-07-15 15:17   ` Alan Mackenzie
2023-07-17 13:42     ` Andrea Corallo
2023-07-17 16:06       ` Eli Zaretskii
2023-07-17 17:43         ` Alan Mackenzie
2023-07-19 11:31         ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).