Mercurial > hg > xemacs-beta
diff lisp/cl-macs.el @ 5301:ec05a30f7148
Fix a bytecomp.el bug compiling #'eql, which was masked by cl-macs.el
lisp/ChangeLog addition:
2010-11-14 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (eql): Don't remove the byte-compile property of this
symbol. That was necessary to override a bug in bytecomp.el where
#'eql was confused with #'eq, which bug we no longer have.
If neither expression is constant, don't attempt to handle the
expression in this compiler macro, leave it to byte-compile-eql,
which produces better code anyway.
* bytecomp.el (eq): #'eql is not the function associated with the
byte-eq byte code.
(byte-compile-eql): Add an explicit compile method for this
function, for cases where the cl-macs compiler macro hasn't
reduced it to #'eq or #'equal.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 14 Nov 2010 13:46:29 +0000 |
parents | bbff29a01820 |
children | 09fed7053634 002cb5224e4f |
line wrap: on
line diff
--- a/lisp/cl-macs.el Sat Nov 06 21:18:52 2010 +0000 +++ b/lisp/cl-macs.el Sun Nov 14 13:46:29 2010 +0000 @@ -3270,7 +3270,6 @@ (defun cl-non-fixnum-number-p (object) (and (numberp object) (not (fixnump object)))) -(put 'eql 'byte-compile nil) (define-compiler-macro eql (&whole form a b) (cond ((eq (cl-const-expr-p a) t) (let ((val (cl-const-expr-val a))) @@ -3282,15 +3281,6 @@ (if (cl-non-fixnum-number-p val) (list 'equal a b) (list 'eq a b)))) - ((cl-simple-expr-p a 5) - (list 'if (list 'numberp a) - (list 'equal a b) - (list 'eq a b))) - ((and (cl-safe-expr-p a) - (cl-simple-expr-p b 5)) - (list 'if (list 'numberp b) - (list 'equal a b) - (list 'eq a b))) (t form))) (macrolet