diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-12-16 15:56:04 +0100 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-12-16 19:18:34 +0100 |
commit | 6283b9233459d74f95e9b0300f025a49f9674fb9 (patch) | |
tree | e252e8cb4228b1321d59e14b3cbbac8980d5f694 /test/lisp/emacs-lisp/syntax-tests.el | |
parent | 30d2b72c4124b351026a8a5420686d5dc04ecc61 (diff) | |
download | emacs-6283b9233459d74f95e9b0300f025a49f9674fb9.tar.gz emacs-6283b9233459d74f95e9b0300f025a49f9674fb9.tar.bz2 emacs-6283b9233459d74f95e9b0300f025a49f9674fb9.zip |
Elide broken but unnecessary `if` optimisations
* lisp/emacs-lisp/byte-opt.el (byte-optimize-if):
Remove explicit clauses purposing to simplify
(if X nil t) -> (not X)
(if X t nil) -> (not (not X))
but never did so because of a coding mistake (eq instead of equal),
found by a recently added warning. They weren't actually needed
thanks to the optimiser's fixpoint iteration: we eventually get the
same results through
(if X nil t) -> (if (not X) t nil) -> (if (not X) t) -> (not X)
(if X t nil) -> (if X t) -> (not (not X))
Diffstat (limited to 'test/lisp/emacs-lisp/syntax-tests.el')
0 files changed, 0 insertions, 0 deletions