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#46834: 28.0.50; byte-compiling the standard counter closure fails Date: Mon, 01 Mar 2021 09:23:48 -0500 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="36646"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46834@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 01 15:51:43 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 1lGjte-0009Pf-Rl for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 15:51:43 +0100 Original-Received: from localhost ([::1]:55222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGjtd-0004yg-UK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 09:51:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGjSs-0002dN-60 for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 09:24:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37047) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGjSr-0004yn-Tr for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 09:24:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGjSr-0000kl-Py for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 09:24: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: Mon, 01 Mar 2021 14:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46834 X-GNU-PR-Package: emacs Original-Received: via spool by 46834-submit@debbugs.gnu.org id=B46834.16146086402887 (code B ref 46834); Mon, 01 Mar 2021 14:24:01 +0000 Original-Received: (at 46834) by debbugs.gnu.org; 1 Mar 2021 14:24:00 +0000 Original-Received: from localhost ([127.0.0.1]:48593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGjSq-0000kV-35 for submit@debbugs.gnu.org; Mon, 01 Mar 2021 09:24:00 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGjSn-0000kE-2T for 46834@debbugs.gnu.org; Mon, 01 Mar 2021 09:23:58 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 255B0441C05; Mon, 1 Mar 2021 09:23:51 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D82CC441BEB; Mon, 1 Mar 2021 09:23:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614608629; bh=tJS+qTq72c5XbpCoNzDc3NGLK+dcAaWGFJLcDkADvOc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dpfRDYf3UmXUMRGCc9d751yJs5Sg36M1PXj2pNUZuT7xCjNuNlaTqdGgZi6xJVjE6 bCz4DsrdzUmtFFRyWWPDryRoQ/hjhn0k4fJpwib0E5LLSL0JX73Bdzi0XXMhT41QnV Q05AmvCbVml5vUdr9KuTZFIziW78sw4oFZUhplBLLrGukfbaMFZWty84xHqVn0gEZC 0bqPV633c8Y1uksFs/rBth4aL6yxXjNpmFDvFLYYGoYV6pIf/UOy9WeqdTnvrVWSCR ROrBcvvc+QtPZGog4kHNQNTL+9qMXybwaaiIl4D1hHNB+Y/w5nMFirqnJMpdL87lBm K61+GUtKlIGOA== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EA4FA12026C; Mon, 1 Mar 2021 09:23:49 -0500 (EST) In-Reply-To: (Pip Cet's message of "Sun, 28 Feb 2021 20:34:36 +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" Xref: news.gmane.io gmane.emacs.bugs:201097 Archived-At: > diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el > index a2fe37a1ee586..7d00b453caf1c 100644 > --- a/lisp/emacs-lisp/bytecomp.el > +++ b/lisp/emacs-lisp/bytecomp.el > @@ -2785,16 +2785,12 @@ byte-compile--reify-function > (dolist (binding env) > (cond > ((consp binding) > - ;; We check shadowing by the args, so that the `let' can be moved > - ;; within the lambda, which can then be unfolded. FIXME: Some of those > - ;; bindings might be unused in `body'. > - (unless (memq (car binding) args) ;Shadowed. > - (push `(,(car binding) ',(cdr binding)) renv))) > + (push `(,(car binding) ',(cdr binding)) renv)) > ((eq binding t)) > (t (push `(defvar ,binding) body)))) > (if (null renv) > `(lambda ,args ,@preamble ,@body) > - `(lambda ,args ,@preamble (let ,(nreverse renv) ,@body))))) > + `(let ,renv (lambda ,args ,@preamble ,@body))))) This looks good, thanks, but it changes the nature of the output of `byte-compile` from a function value to an expression whose evaluation returns a function value. So I think we should tweak `byte-compile` so it calls `eval` on the result in this particular case. Stefan