[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46834: 28.0.50; byte-compiling the standard counter closure fails
From: |
Stefan Monnier |
Subject: |
bug#46834: 28.0.50; byte-compiling the standard counter closure fails |
Date: |
Mon, 01 Mar 2021 09:23:48 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> 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
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails,
Stefan Monnier <=
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Pip Cet, 2021/03/01
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Stefan Monnier, 2021/03/01
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Lars Ingebrigtsen, 2021/03/02
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Pip Cet, 2021/03/02
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Lars Ingebrigtsen, 2021/03/02
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Pip Cet, 2021/03/02
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Eli Zaretskii, 2021/03/02
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Pip Cet, 2021/03/02
- bug#46834: 28.0.50; byte-compiling the standard counter closure fails, Eli Zaretskii, 2021/03/02