X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fcompiler-support.lisp;h=fa1a9172a767dcb64325376759bf4e013aa93c21;hb=cd99f20d910298cbf5c2000e3dc3595fb0c8418b;hp=d4e113e132c43745236510fe93900778186f75a2;hpb=bd0ba0f214518e8d72ff2d44de5a1e3e4b02af2c;p=sbcl.git diff --git a/src/pcl/compiler-support.lisp b/src/pcl/compiler-support.lisp index d4e113e..fa1a917 100644 --- a/src/pcl/compiler-support.lisp +++ b/src/pcl/compiler-support.lisp @@ -38,7 +38,7 @@ (movable foldable flushable explicit-check)) (deftransform sb-pcl::pcl-instance-p ((object)) - (let* ((otype (continuation-type object)) + (let* ((otype (lvar-type object)) (std-obj (specifier-type 'sb-pcl::std-object))) (cond ;; Flush tests whose result is known at compile time. @@ -51,8 +51,10 @@ (let ((arg-pos (position-if #'listp stuff))) (if arg-pos `(defmethod ,name ,@(subseq stuff 0 arg-pos) - ,(nth-value 2 (sb-pcl::parse-specialized-lambda-list - (elt stuff arg-pos)))) + ,(handler-case + (nth-value 2 (sb-pcl::parse-specialized-lambda-list + (elt stuff arg-pos))) + (error () ""))) `(defmethod ,name "")))) (defvar sb-pcl::*internal-pcl-generalized-fun-name-symbols* nil) @@ -76,3 +78,16 @@ (symbolp slot) (symbolp class)) (values t slot))))) + +(defun sb-pcl::random-documentation (name type) + (cdr (assoc type (info :random-documentation :stuff name)))) + +(defun sb-pcl::set-random-documentation (name type new-value) + (let ((pair (assoc type (info :random-documentation :stuff name)))) + (if pair + (setf (cdr pair) new-value) + (push (cons type new-value) + (info :random-documentation :stuff name)))) + new-value) + +(defsetf sb-pcl::random-documentation sb-pcl::set-random-documentation)