[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master f9d7440: ; * lisp/emacs-lisp/byte-opt.el (byte-optimize-eq):
From: |
Mattias Engdegård |
Subject: |
Re: master f9d7440: ; * lisp/emacs-lisp/byte-opt.el (byte-optimize-eq): Fix last change. |
Date: |
Tue, 20 Jul 2021 23:00:34 +0200 |
20 juli 2021 kl. 22.07 skrev Pip Cet <pipcet@gmail.com>:
> I played around with simple expressions a little after this patch, and
> things didn't seem quite right.
Oh no...
> The good news is they weren't quite
> right without the patch, either.
Phew! Got away this time.
> I find things work better with the attached patch applied. If it is as
> obviously correct as it seems to me, it should probably be applied.
Good spotting! I don't see why not. In fact it probably allows us to remove my
ad-hoc 'nil => nil at the end of `byte-optimize-form`.
> But it does occur to me this code optimizes (quote) to nil. Is that
> intentional? Is it worth fixing? (It also optimizes (quote 1 2 3) to
> 1).
At least (quote 1 2 3) gives a warning -- I'd say it should be a hard error but
the compiler seems to be soft on law and order, damn hippies -- but (quote)
doesn't even reach `byte-optimize-quote`; it's converted to nil in
`byte-optimize-form-code-walker` without as much as a squeak.