X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fearly-low.lisp;h=abca53479d4a7b66fea887003eb4cb77ab3d4384;hb=22aec7852f4861e5dab28cc0d619c24b62590dad;hp=4c470cc6639f6c19e3d7a7403c725491e485c016;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/pcl/early-low.lisp b/src/pcl/early-low.lisp index 4c470cc..abca534 100644 --- a/src/pcl/early-low.lisp +++ b/src/pcl/early-low.lisp @@ -25,6 +25,8 @@ ;;;; specification. (in-package "SB-PCL") + +(/show "starting early-low.lisp") ;;; FIXME: The PCL package is internal and is used by code in potential ;;; bottlenecks. Access to it might be faster through #.(find-package "SB-PCL") @@ -37,11 +39,10 @@ ;;; could be made less viciously brittle when SB-FLUID.) ;;; (Or perhaps just define a macro ;;; (DEFMACRO PKG (NAME) -;;; #!-SB-FLUID (FIND-PACKAGE NAME) -;;; #!+SB-FLUID `(FIND-PACKAGE ,NAME)) +;;; #-SB-FLUID (FIND-PACKAGE NAME) +;;; #+SB-FLUID `(FIND-PACKAGE ,NAME)) ;;; and use that to replace all three variables.) (defvar *pcl-package* (find-package "SB-PCL")) -(defvar *slot-accessor-name-package* (find-package "SB-SLOT-ACCESSOR-NAME")) ;;; This excludes structure types created with the :TYPE option to ;;; DEFSTRUCT. It also doesn't try to deal with types created by @@ -52,7 +53,15 @@ ;;; it needs a more mnemonic name. -- WHN 19991204 (defun structure-type-p (type) (and (symbolp type) - (let ((class (cl:find-class type nil))) - (and class - (typep (sb-kernel:layout-info (sb-kernel:class-layout class)) - 'sb-kernel:defstruct-description))))) + (not (condition-type-p type)) + (let ((classoid (find-classoid type nil))) + (and classoid + (typep (layout-info + (classoid-layout classoid)) + 'defstruct-description))))) + +(defun condition-type-p (type) + (and (symbolp type) + (condition-classoid-p (find-classoid type nil)))) + +(/show "finished with early-low.lisp")