X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fcompiler-support.lisp;h=58e462f73542a670a38db5c8468171eb5e10130d;hb=a4640afb239d4de3e348430fd9903fc3a88b9139;hp=f4759431798f2436de38199871deb4655ba35429;hpb=3a5eefac8a65dfd36729031f0a9b9dd8c022b7f2;p=sbcl.git diff --git a/src/pcl/compiler-support.lisp b/src/pcl/compiler-support.lisp index f475943..58e462f 100644 --- a/src/pcl/compiler-support.lisp +++ b/src/pcl/compiler-support.lisp @@ -39,14 +39,19 @@ (deftransform sb-pcl::pcl-instance-p ((object)) (let* ((otype (lvar-type object)) - (std-obj (specifier-type 'sb-pcl::std-object))) + (standard-object (specifier-type 'standard-object))) (cond ;; Flush tests whose result is known at compile time. - ((csubtypep otype std-obj) t) - ((not (types-equal-or-intersect otype std-obj)) nil) + ((csubtypep otype standard-object) t) + ((not (types-equal-or-intersect otype standard-object)) nil) (t `(typep (layout-of object) 'sb-pcl::wrapper))))) +(defun sb-pcl::safe-code-p (&optional env) + (let* ((lexenv (or env (make-null-lexenv))) + (policy (lexenv-policy lexenv))) + (eql (cdr (assoc 'safety policy)) 3))) + (define-source-context defmethod (name &rest stuff) (let ((arg-pos (position-if #'listp stuff))) (if arg-pos