From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled Date: Wed, 10 Mar 2021 09:02:35 -0500 Message-ID: References: <83r1kop5rq.fsf@gnu.org> <838s6vp32t.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="27616"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47025@debbugs.gnu.org, Andrea Corallo To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 10 15:04:56 2021 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 1lJzSJ-00071J-T4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Mar 2021 15:04:56 +0100 Original-Received: from localhost ([::1]:46854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJzSE-0001kS-E2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Mar 2021 09:04:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJzQX-0000jn-E9 for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2021 09:03:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJzQT-0000zE-Sx for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2021 09:03:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJzQT-0005ok-Pv for bug-gnu-emacs@gnu.org; Wed, 10 Mar 2021 09:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Mar 2021 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47025 X-GNU-PR-Package: emacs Original-Received: via spool by 47025-submit@debbugs.gnu.org id=B47025.161538496522338 (code B ref 47025); Wed, 10 Mar 2021 14:03:01 +0000 Original-Received: (at 47025) by debbugs.gnu.org; 10 Mar 2021 14:02:45 +0000 Original-Received: from localhost ([127.0.0.1]:49261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJzQC-0005oE-OD for submit@debbugs.gnu.org; Wed, 10 Mar 2021 09:02:44 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJzQA-0005o0-Sl for 47025@debbugs.gnu.org; Wed, 10 Mar 2021 09:02:43 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 6A105440BBF; Wed, 10 Mar 2021 09:02:37 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1AF32440B38; Wed, 10 Mar 2021 09:02:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1615384956; bh=UIXwt0KDcOFogo1aDsTB0RHCAya8nCRLiMCkJWl90U4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=RTghNZkBIXkUsiNAYWCGt9Am33w0K1LokgaBENF+swS+mX123nDhIQo5shvdBFROC anGBslf8bX6fC30DPAYJ63sfJr7vr6bISHU9t9nV0FTzILS64dN7Tl2T7cHr3lVqUL 7GZP71+yHfvGdjdhlu5zDJfZ64lTOETKZBpy4+6VXv6Vq8KIFWlNjDQBAaR4SZ2ZPv 1sKXwQ6ja+2ylZImNsI7FX7IB1HV9Qfnav0V76VrHU3W5pXJ3+W/SmuRwONmJTXfIu KjV9UjLFxZVU5zFa3uMkyES7HIH2cCUF70s+F+IEUfR6s7bcFpklzLxwucmUQszJ8G bAJAfQ6JunoBg== Original-Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D5101120470; Wed, 10 Mar 2021 09:02:35 -0500 (EST) In-Reply-To: <838s6vp32t.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 10 Mar 2021 15:10:02 +0200") 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:201985 Archived-At: >> (load "emacs-lisp/macroexp") >> (if (byte-code-function-p (symbol-function 'macroexpand-all)) >> nil >> ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply >> ;; fail until pcase is explicitly loaded. This also means that we have to >> ;; disable eager macro-expansion while loading pcase. >> (let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase")) >> ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase. >> (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth))) >> (load "emacs-lisp/macroexp"))) >> ==== >> >> > need to preload pcase? >> >> I fear I don't have an answer as ATM I don't uderstand why it should be >> different compared to master. > > Stefan, any ideas why this happens on the native-comp branch but not > on master? It's probably the `byte-code-function-p` which tries to distinguish the case where macroexp has not yet been compiled, but on the native branch, I suspect that (byte-code-function-p (symbol-function 'macroexpand-all)) will return nil when macroexp has been compiled because it's now a `subrp`. So we could replace (byte-code-function-p (symbol-function 'macroexpand-all)) with (or (byte-code-function-p (symbol-function 'macroexpand-all)) (subrp (symbol-function 'macroexpand-all))) or with (not (consp (symbol-function 'macroexpand-all))) -- Stefan