]> git.eshelyaron.com Git - emacs.git/commit
Fix constant folding of overflows feature/gnus-select
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Mar 2018 00:03:54 +0000 (17:03 -0700)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:18:31 +0000 (14:18 +0800)
commit5b0fed956e755eaf0b0dce148b3de39a390d1195
treedacbc54147ed33613ccc5f71efc8215db884c04c
parent5a330784781cf184033dd57f0c386b6a34e06674
Fix constant folding of overflows

This suppresses some byte-code optimizations that were invalid in
the presence of integer overflows, because they meant that .elc
files assumed the runtime behavior of the compiling platform, as
opposed to the runtime platform.  Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2018-03/msg00753.html
* lisp/emacs-lisp/byte-opt.el (byte-opt--portable-max)
(byte-opt--portable-min): New constants.
(byte-opt--portable-numberp, byte-opt--arith-reduce)
(byte-optimize-1+, byte-optimize-1-): New functions.
(byte-optimize-plus, byte-optimize-minus, byte-optimize-multiply)
(byte-optimize-divide): Avoid invalid optimizations.
(1+, 1-): Use new optimizers.
(byte-optimize-or, byte-optimize-cond): Simplify by using
remq instead of delq and copy-sequence.
lisp/emacs-lisp/byte-opt.el