X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fpred.lisp;h=ee5c9e8b23919d1ff316ae10745b69017400611b;hb=53ab0266f9a92943cc93f675cc727d01cfa55474;hp=7d006cce2b6bb789a15163a745b7092954b0218b;hpb=b2f0204834bd0c314d44942dd92475c15ffa8c89;p=sbcl.git diff --git a/src/code/pred.lisp b/src/code/pred.lisp index 7d006cc..ee5c9e8 100644 --- a/src/code/pred.lisp +++ b/src/code/pred.lisp @@ -317,18 +317,21 @@ length and have identical components. Other arrays must be EQ to be EQUAL." (hash-table-equalp x y))) ((%instancep x) (let* ((layout-x (%instance-layout x)) - (len (layout-length layout-x))) + (raw-len (layout-n-untagged-slots layout-x)) + (total-len (layout-length layout-x)) + (normal-len (- total-len raw-len))) (and (%instancep y) (eq layout-x (%instance-layout y)) (structure-classoid-p (layout-classoid layout-x)) - (do ((i 1 (1+ i))) - ((= i len) t) - (declare (fixnum i)) + (dotimes (i normal-len t) (let ((x-el (%instance-ref x i)) (y-el (%instance-ref y i))) (unless (or (eq x-el y-el) (equalp x-el y-el)) - (return nil))))))) + (return nil)))) + (if (zerop raw-len) + t + (raw-instance-slots-equalp layout-x x y))))) ((vectorp x) (let ((length (length x))) (and (vectorp y)