Deduplicate non-fixnum numeric constants in byte-compilation

* lisp/emacs-lisp/bytecomp.el (byte-compile-get-constant):
Use eql for looking up constants instead of eq, allowing
for bignum and flonum deduplication (bug#38708).
This commit is contained in:
Mattias Engdegård 2019-12-22 12:09:06 +01:00
parent 2902fb035a
commit 4fff3edec8

View file

@ -3462,7 +3462,7 @@ for symbols generated by the byte compiler itself."
(if (equal-including-properties (car elt) ,const)
(setq result elt)))
result)
(assq ,const byte-compile-constants))
(assoc ,const byte-compile-constants #'eql))
(car (setq byte-compile-constants
(cons (list ,const) byte-compile-constants)))))