]> git.eshelyaron.com Git - emacs.git/commit
Fix closure-conversion of shadowed captured lambda-lifted vars
authorMattias Engdegård <mattiase@acm.org>
Mon, 22 Nov 2021 15:56:38 +0000 (16:56 +0100)
committerMattias Engdegård <mattiase@acm.org>
Wed, 12 Jan 2022 15:51:01 +0000 (16:51 +0100)
commit3ec8c8b3ae2359ceb8135b672e86526969c16b7e
treed456c8c85aa895ca4611a48ef68dd3ba753b0264
parent862faa64e5c41f232a636dc3b28089040cf8bc0a
Fix closure-conversion of shadowed captured lambda-lifted vars

Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).

Reported by Paul Pogonyshev.

* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.

(cherry picked from commit 45252ad8f932c98a373ef0ab7f3363a3e27ccbe4)
lisp/emacs-lisp/cconv.el
test/lisp/emacs-lisp/bytecomp-tests.el
test/lisp/emacs-lisp/cconv-tests.el