]> git.eshelyaron.com Git - emacs.git/commit
Relax portable number check in byte compiler (bug#42147)
authorMattias Engdegård <mattiase@acm.org>
Fri, 3 Jul 2020 18:13:50 +0000 (20:13 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 5 Jul 2020 14:56:32 +0000 (16:56 +0200)
commitc10293e168f752607ae51edd09922505927c29b1
tree3bb644794244d07091c52ad32b9586f0f1011f3c
parent1560c92c9c205901d822a3ab3fba00ad6bf9805c
Relax portable number check in byte compiler (bug#42147)

With bignums, the set of representable integers is no longer
platform-dependent, and since we use nothing but IEEE754 64-bit
floats, all numbers are now portable.  Take advantage of this fact
to simplify constant-folding in the byte compiler, allowing it to
be applied more widely.

* lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max)
(byte-opt--portable-min, byte-opt--portable-numberp): Remove.
(byte-opt--arith-reduce, byte-optimize-minus, byte-optimize-1+)
(byte-optimize-1-): Simplify: any number will do, and if N is a
number, then so are -N, N+1 and N-1.
lisp/emacs-lisp/byte-opt.el