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#71934: comp--spill-lap-function and closure (wad: bug#71934: 31.0.50; edebug--called-interactively-skip vs. new fun objects) Date: Sat, 06 Jul 2024 04:06:25 -0400 Message-ID: References: <87zfqwh1gb.fsf@web.de> <86o77c75jd.fsf@gnu.org> <87bk3b8h2n.fsf@web.de> <86plrr58nv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32960"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Michael Heerdegen , acm@muc.de, monnier@iro.umontreal.ca, 71934@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 06 10:07:16 2024 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 1sQ0Rw-0008Oj-Qu for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jul 2024 10:07:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQ0Rg-0000UU-LP; Sat, 06 Jul 2024 04:07:00 -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 1sQ0Rf-0000UL-1h for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 04:06:59 -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 1sQ0Re-0007Ks-Q5 for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 04:06:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQ0Ri-0006Ah-8h for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2024 04:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2024 08:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71934 X-GNU-PR-Package: emacs Original-Received: via spool by 71934-submit@debbugs.gnu.org id=B71934.172025319823687 (code B ref 71934); Sat, 06 Jul 2024 08:07:02 +0000 Original-Received: (at 71934) by debbugs.gnu.org; 6 Jul 2024 08:06:38 +0000 Original-Received: from localhost ([127.0.0.1]:45549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQ0RJ-00069z-Nt for submit@debbugs.gnu.org; Sat, 06 Jul 2024 04:06:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQ0RH-00069m-Jt for 71934@debbugs.gnu.org; Sat, 06 Jul 2024 04:06:36 -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 1sQ0R7-0007Gv-Jx; Sat, 06 Jul 2024 04:06:25 -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=QtFYhmtgRKmFY+dwdJ/R++wYl9wdvPYn8YkjTl2mx6Y=; b=fQWP/orGh/kjUmKKLkh1 Wa0Tl/276YtdjBeyDCl1lfsxiQihMM08BaUwViazKLMHT6ypeTOJT6T4pQDf3k4f2jmIAeQAbQXMX s4IxZvC+MyHECDXDQaEcvld6/Wtm5YEhlUZW6qINtySaaPKcir9vC/OrJcOys85gwbyvvYtbkdPIM s64XUZr0IlbsUmj66TXsgeMPIrY1DdlYjPxPfHhPgB+RBcrpYjRbi2lnzn/QgdYl676rFnwPA5Kv2 4HkO8bDVu/ZXaWvVqLDUywHyhWQ4XVS7Z7Q4pYDjpyvja6kfot2mw0U4hx7BOuKSdKcaZdBME1up8 FMAwzRy9RwdZ1w==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sQ0R7-0004mD-8A; Sat, 06 Jul 2024 04:06:25 -0400 In-Reply-To: <86plrr58nv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Jul 2024 09:36:20 +0300") 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:288475 Archived-At: Eli Zaretskii writes: >> From: Michael Heerdegen >> Cc: Stefan Monnier , Andrea Corallo >> , Eli Zaretskii , 71934@debbugs.gnu.org >> Date: Sat, 06 Jul 2024 03:06:24 +0200 >> >> Alan Mackenzie writes: >> >> > > > 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. >> >> We are actually trying to do that, but we don't understand the code >> because of the lacking or wrong documentation. > > I don't understand this difficulty. Andrea, who wrote that function > (and everything around it) is here, and is very helpful. How come > this lack of understanding, let alone lack of documentation, is still > with us? Must say I'm really lost in this thread. First I don't understand the functionality that got lost. Second the method "comp-spill-lap-function ((form list))" never served the case (native-compile 'foo) but rather (native-compile '(lambda () 3)). (Now if the form (closure () 3) does not exist in elisp as valid form this might translate in 1 line fix in 'comp-spill-lap-function ((form list))' but let discuss this aside and is not about a lost functionality). (native-compile 'foo) is served by 'comp--spill-lap-function ((function-name symbol))'. Also: (native-compile 'foo) works (as always did) and even what Alan added (native compiling lambdas in function native compiled by symbol name) that is: (defun foo () "foo doc string" (lambda () "lambda doc string" 3)) (subr-native-elisp-p (funcall (native-compile 'foo))) Still works for me on master. So I must be really missing something in this discussion. Let us please stick to exactly what worked in which version and what does not in which other version, if we identify a case will be easy to fix. And even more importantly, I'll make sure we have a test that covers that case so we can't have any other regression (assuming we had one). Thanks Andrea