X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fmacros.lisp;h=44c4127bac714682c94af8a2695d537afcaaad32;hb=bd0ba0f214518e8d72ff2d44de5a1e3e4b02af2c;hp=823994e0deb14085d5932eee6a6a47c4ebd7edd7;hpb=2d3cb6dba6461e98744eca2a1df4f770cea468ca;p=sbcl.git diff --git a/src/pcl/macros.lisp b/src/pcl/macros.lisp index 823994e..44c4127 100644 --- a/src/pcl/macros.lisp +++ b/src/pcl/macros.lisp @@ -87,9 +87,6 @@ (defmacro find-class-cell-predicate (cell) `(cadr ,cell)) -(defmacro find-class-cell-make-instance-function-keys (cell) - `(cddr ,cell)) - (defmacro make-find-class-cell (class-name) (declare (ignore class-name)) '(list* nil #'constantly-nil nil)) @@ -108,8 +105,8 @@ (defun find-class-from-cell (symbol cell &optional (errorp t)) (or (find-class-cell-class cell) (and *create-classes-from-internal-structure-definitions-p* - (structure-type-p symbol) - (find-structure-class symbol)) + (or (structure-type-p symbol) (condition-type-p symbol)) + (ensure-non-standard-class symbol)) (cond ((null errorp) nil) ((legal-class-name-p symbol) (error "There is no class named ~S." symbol)) @@ -160,23 +157,26 @@ (or (find-class-cell-class ,class-cell) ,(if errorp `(find-class-from-cell ',symbol ,class-cell t) - `(and (sb-kernel:classoid-cell-classoid - ',(sb-kernel:find-classoid-cell symbol)) + `(and (classoid-cell-classoid + ',(find-classoid-cell symbol)) (find-class-from-cell ',symbol ,class-cell nil)))))) form)) -(defun (setf find-class) (new-value symbol) - (if (legal-class-name-p symbol) - (let ((cell (find-class-cell symbol))) +(defun (setf find-class) (new-value name &optional errorp environment) + (declare (ignore errorp environment)) + (if (legal-class-name-p name) + (let ((cell (find-class-cell name))) (setf (find-class-cell-class cell) new-value) + (when (and (eq *boot-state* 'complete) (null new-value)) + (setf (find-classoid name) nil)) (when (or (eq *boot-state* 'complete) (eq *boot-state* 'braid)) (when (and new-value (class-wrapper new-value)) (setf (find-class-cell-predicate cell) (fdefinition (class-predicate-name new-value)))) - (update-ctors 'setf-find-class :class new-value :name symbol)) + (update-ctors 'setf-find-class :class new-value :name name)) new-value) - (error "~S is not a legal class name." symbol))) + (error "~S is not a legal class name." name))) (/show "pcl/macros.lisp 230")