From: Andrea Corallo <acorallo@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: 64646@debbugs.gnu.org
Subject: bug#64646: Master: Native compiler doesn't always compile lambda forms.
Date: Mon, 17 Jul 2023 09:17:13 -0400 [thread overview]
Message-ID: <yp1wmyyu17q.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <ZLKMnk8DgVUFKZye@ACM> (Alan Mackenzie's message of "Sat, 15 Jul 2023 12:10:06 +0000")
Alan Mackenzie <acm@muc.de> writes:
> In the master branch:
>
> (i) emacs -Q
> (ii) C-x b foo.el <RET>
> (iii) Insert into foo.el:
> ;; -*- lexical-binding:t -*-
> (iv) M-x emacs-lisp-mode
> (v) Insert into foo.el:
> (defun foo () "foo doc string"
> (lambda (bar) "lambda doc string" (car bar)))
> (vi) With point after the function, C-x C-e to evaluate it.
>
> (vii) M-: (native-compile 'foo)
> This returns #<subr foo>
> (viii) M-: (foo)
> This returns the lambda form as a byte-compiled function. This is a bug:
> it should return the lambda form as a native-compiled function.
>
> Note: this bug is also in the emacs-29 branch.
Hi Alan,
I can reproduce, (native-compile 'foo) compiles only foo, compiling the
whole compilation unit with eg `emacs-lisp-native-compile-and-load'
compiles as expected also the inner lambda.
I'm not 100% convinced this behaviour is a bug tho.
Andrea
next prev parent reply other threads:[~2023-07-17 13:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-15 12:10 bug#64646: Master: Native compiler doesn't always compile lambda forms Alan Mackenzie
2023-07-15 13:06 ` Eli Zaretskii
2023-07-15 13:20 ` Alan Mackenzie
2023-07-16 4:16 ` Michael Heerdegen
2023-07-16 9:01 ` Alan Mackenzie
2023-07-17 2:01 ` Michael Heerdegen
2023-07-17 13:17 ` Andrea Corallo [this message]
2023-07-20 12:14 ` Alan Mackenzie
2023-07-26 14:57 ` Andrea Corallo
2023-10-29 13:21 ` Alan Mackenzie
2023-11-02 17:32 ` Andrea Corallo
2023-11-08 20:59 ` Alan Mackenzie
2023-11-09 10:08 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yp1wmyyu17q.fsf@fencepost.gnu.org \
--to=acorallo@gnu.org \
--cc=64646@debbugs.gnu.org \
--cc=acm@muc.de \
/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 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).