]> 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, 1 Dec 2021 15:58:25 +0000 (16:58 +0100)
commit45252ad8f932c98a373ef0ab7f3363a3e27ccbe4
tree0bef2ae3b6673b980927d2e5124db99b0323f076
parent6a60bd475d67b7e8c9184836abf7eea229183066
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.
lisp/emacs-lisp/cconv.el
test/lisp/emacs-lisp/bytecomp-tests.el
test/lisp/emacs-lisp/cconv-tests.el