]> git.eshelyaron.com Git - emacs.git/commitdiff
Deduplicate non-fixnum numeric constants in byte-compilation
authorMattias Engdegård <mattiase@acm.org>
Sun, 22 Dec 2019 11:09:06 +0000 (12:09 +0100)
committerMattias Engdegård <mattiase@acm.org>
Fri, 27 Dec 2019 13:55:22 +0000 (14:55 +0100)
* 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).

lisp/emacs-lisp/bytecomp.el

index 118356ec26a4bc3fcdeeaefd8ba0df73d47cc9ea..60dbae1d4bc50d66b4ac67712dc65f229af39e70 100644 (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)))))