From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56648: 29.0.50; Need for `compiled-function-p` Date: Tue, 19 Jul 2022 16:43:27 -0400 Message-ID: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39958"; mail-complaints-to="usenet@ciao.gmane.io" To: 56648@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 19 22:44:10 2022 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 1oDu4f-000ABd-T2 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 22:44:10 +0200 Original-Received: from localhost ([::1]:34326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDu4e-0006Us-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 16:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDu4Y-0006Uk-Sa for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 16:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDu4Y-0002Cy-K8 for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 16:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDu4Y-0003iM-Fg for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 16:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jul 2022 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56648 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165826342614243 (code B ref -1); Tue, 19 Jul 2022 20:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jul 2022 20:43:46 +0000 Original-Received: from localhost ([127.0.0.1]:55248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDu4H-0003he-La for submit@debbugs.gnu.org; Tue, 19 Jul 2022 16:43:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:49866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDu4F-0003hW-WF for submit@debbugs.gnu.org; Tue, 19 Jul 2022 16:43:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDu4F-0006T0-N1 for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 16:43:43 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15527) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDu4D-0002BH-4o for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 16:43:42 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 25C914416C5 for ; Tue, 19 Jul 2022 16:43:39 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AB9694416C2 for ; Tue, 19 Jul 2022 16:43:37 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1658263417; bh=d5ZXEBnue0mDYX3ok/xneFfmSJy+EdGpMRne5RsErTM=; h=From:To:Subject:Date:From; b=kp6FkORe2lKClY8f53TGSNK296F81Q+yFEUuQusfBbT8J1+ej+kNTr8Vi9rF0YR0N f08ardk27cdQWVOtRDIbtd3XljiAL6cH1oX2u/QbLv1xULF94qulfTr0YilFjderuO eNNlawrRJLOMbHHOzRwzzXevHuULunTL9VP05sgNxL7G/4es408kurlZzQeOijTLSH YAErim9YUOI58oDh1M2dov8JtHuOdkBCNUlV+tx4OJMfv/OE3b9fgEDUvoYSOhbCJe DcYWHzsaGD/MhWhuorH5JjMA+6Ksx8Nbu/pnb15w0zItOwpkDorpjVJxQaPnVIEpoz s5VqjII0x9XGA== Original-Received: from alfajor (modemcable117.17-80-70.mc.videotron.ca [70.80.17.117]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9A70C1201B4 for ; Tue, 19 Jul 2022 16:43:37 -0400 (EDT) Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:237466 Archived-At: Package: Emacs Version: 29.0.50 I think we need something like `compiled-function-p`, i.e. a function which will return non-nil for both byte-code and native-code functions. Its definition would be (defun compiled-function-p (obj) "" (or (byte-code-function-p obj) (subr-native-elisp-p obj))) This is because `byte-code-function-p` shouldn't be changed to return non-nil for native-code functions (both because it would break a lot of code and because the name would be too confusing), but several uses of `byte-code-function-p` actually want to know "is this an (inefficient) source code function or not" (e.g. in unidata-gen.el, loadup.el, bytecomp.el, ...). Stefan