Commit 7e8517c9 authored by c.rhodes's avatar c.rhodes
Browse files

mumble-equal microoptimization

In WINDOW-EQUAL and friends, EQL arguments imply EQUAL.

darcs-hash:20081008100308-dc3a5-61024cd08a4737f6b141840b6582728c14ac9f33.gz
parent 60bb7819
......@@ -827,15 +827,17 @@
(macrolet ((make-mumble-equal (type)
;; Since caching is only done for objects created by the
;; client, we must always compare ID and display
;; client, we must always compare ID and display for
;; non-identical mumbles.
(let ((predicate (xintern type '-equal))
(id (xintern type '-id))
(dpy (xintern type '-display)))
`(within-definition (,type make-mumble-equal)
(defun ,predicate (a b)
(declare (type ,type a b))
(and (= (,id a) (,id b))
(eq (,dpy a) (,dpy b))))))))
(or (eql a b)
(and (= (,id a) (,id b))
(eq (,dpy a) (,dpy b)))))))))
(make-mumble-equal window)
(make-mumble-equal pixmap)
(make-mumble-equal cursor)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment