From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#64646: Master: Native compiler doesn't always compile lambda forms. Date: Mon, 17 Jul 2023 09:17:13 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34947"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64646@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 17 15:18:37 2023 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 1qLO7Y-0008uM-Uh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Jul 2023 15:18:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLO7I-0003bm-4d; Mon, 17 Jul 2023 09:18:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLO6z-0003QW-VS for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 09:18:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qLO6z-00012e-MC for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 09:18:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLO6z-00056B-IH for bug-gnu-emacs@gnu.org; Mon, 17 Jul 2023 09:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Jul 2023 13:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64646 X-GNU-PR-Package: emacs Original-Received: via spool by 64646-submit@debbugs.gnu.org id=B64646.168959984319548 (code B ref 64646); Mon, 17 Jul 2023 13:18:01 +0000 Original-Received: (at 64646) by debbugs.gnu.org; 17 Jul 2023 13:17:23 +0000 Original-Received: from localhost ([127.0.0.1]:49436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLO6N-00055D-Dx for submit@debbugs.gnu.org; Mon, 17 Jul 2023 09:17:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLO6L-000550-4C for 64646@debbugs.gnu.org; Mon, 17 Jul 2023 09:17:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLO6F-0000mO-3H; Mon, 17 Jul 2023 09:17:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=qjSXiaM+NXD6nDn1vlrnAEocj0LoEgz7zhOaasVKLd4=; b=Lc2OUlk7huMIOoGI1Bwc nZG6GfzWDzb/dfA/LlHyDXweNJdn83VP9beJ6ikSvgt7qi1NsDkCDNCkAtFuTQebKREt4wEW5SOxp n4Yika2aQYItufD8LOiR84guqoowcIeJ7+iN2LhiswJUECb0/vmioHDtPL0sVXvcLbQSh9kI0+Re5 /kRW8l7uHIOV7YLTqZWuNB0mEHkjnrCfgc6iVRLFm5swM6KuQnFiEqsgRyak1wS4OwoFuulH/9lgZ cKdVkKtXFDFxCxLKk6K0hyEsPMoighLbdPRGmmWQQ3zLanIPuTYbWRdKHPDB4tlJvbP3pHQ+8G+CV 4zI9pFX8kUtFBw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1qLO6D-0003Ix-U6; Mon, 17 Jul 2023 09:17:14 -0400 In-Reply-To: (Alan Mackenzie's message of "Sat, 15 Jul 2023 12:10:06 +0000") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265396 Archived-At: Alan Mackenzie writes: > In the master branch: > > (i) emacs -Q > (ii) C-x b foo.el > (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 # > (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