]> git.eshelyaron.com Git - emacs.git/commit
More robust optimisation of `ignore`
authorMattias Engdegård <mattiase@acm.org>
Thu, 10 Jun 2021 19:27:16 +0000 (21:27 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 6 Sep 2021 14:47:13 +0000 (16:47 +0200)
commitbba48d6ee5d90f326c70cbe8af19dfe6b00651ba
tree4f63312d69c51ddcaecb34799a784c85d97de1ef
parentfab1e220dbe38ab7a2f46b673dfc03964e496798
More robust optimisation of `ignore`

Treat `ignore` as any other function during source-level optimisation,
to avoid having its warning-suppression effects cancelled by repeated
passes.  Instead, define a custom code generation function.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Don't treat `ignore' specially here.
(side-effect-free-fns): Don't mark `ignore` as side-effect-free
or error-free (although it is), since that would allow the optimiser
to elide calls.
* lisp/emacs-lisp/bytecomp.el (ignore, byte-compile-ignore):
Define and register a code-gen function.
lisp/emacs-lisp/byte-opt.el
lisp/emacs-lisp/bytecomp.el