X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpcl%2Fmacros.lisp;h=437e802990450ceb42b021799491b2175c1e8439;hb=e86533e804513080f610795b9d43ca36ad842467;hp=a9a657fd48ed0f23009b97eb2d3a8b8797d6e097;hpb=4f7161165647d655392713a0d95c951e4e1749ea;p=sbcl.git diff --git a/src/pcl/macros.lisp b/src/pcl/macros.lisp index a9a657f..437e802 100644 --- a/src/pcl/macros.lisp +++ b/src/pcl/macros.lisp @@ -29,15 +29,10 @@ (/show "starting pcl/macros.lisp") (declaim (declaration - ;; As of sbcl-0.7.0.6, SBCL actively uses this declaration - ;; to propagate information needed to set up nice debug - ;; names (as seen e.g. in BACKTRACE) for method functions. - %method-name ;; These nonstandard declarations seem to be used privately ;; within PCL itself to pass information around, so we can't ;; just delete them. %class - %method-lambda-list ;; This declaration may also be used within PCL to pass ;; information around, I'm not sure. -- WHN 2000-12-30 %variable-rebinding)) @@ -52,15 +47,6 @@ (/show "pcl/macros.lisp 85") -(defmacro doplist ((key val) plist &body body) - `(let ((.plist-tail. ,plist) ,key ,val) - (loop (when (null .plist-tail.) (return nil)) - (setq ,key (pop .plist-tail.)) - (when (null .plist-tail.) - (error "malformed plist, odd number of elements")) - (setq ,val (pop .plist-tail.)) - (progn ,@body)))) - (/show "pcl/macros.lisp 101") (defmacro dolist-carefully ((var list improper-list-handler) &body body) @@ -96,7 +82,8 @@ (ensure-non-standard-class symbol classoid)))))) (cond ((null errorp) nil) ((legal-class-name-p symbol) - (error "There is no class named ~S." symbol)) + (error "There is no class named ~ + ~/sb-impl::print-symbol-with-prefix/." symbol)) (t (error "~S is not a legal class name." symbol))))) @@ -110,10 +97,8 @@ ;;; This DEFVAR was originally in defs.lisp, now moved here. ;;; ;;; Possible values are NIL, EARLY, BRAID, or COMPLETE. -;;; -;;; KLUDGE: This should probably become -;;; (DECLAIM (TYPE (MEMBER NIL :EARLY :BRAID :COMPLETE) *BOOT-STATE*)) -(defvar *boot-state* nil) +(declaim (type (member nil early braid complete) **boot-state**)) +(defglobal **boot-state** nil) (/show "pcl/macros.lisp 187") @@ -123,7 +108,7 @@ (if (and (constantp symbol) (legal-class-name-p (setf symbol (constant-form-value symbol))) (constantp errorp) - (member *boot-state* '(braid complete))) + (member **boot-state** '(braid complete))) (let ((errorp (not (null (constant-form-value errorp)))) (cell (make-symbol "CLASSOID-CELL"))) `(let ((,cell (load-time-value (find-classoid-cell ',symbol :create t)))) @@ -144,19 +129,20 @@ (with-single-package-locked-error (:symbol name "Using ~A as the class-name argument in ~ (SETF FIND-CLASS)")) - (let ((cell (find-classoid-cell name :create new-value))) - (cond (new-value - (setf (classoid-cell-pcl-class cell) new-value) - (when (eq *boot-state* 'complete) - (let ((classoid (class-classoid new-value))) - (setf (find-classoid name) classoid) - (set-class-type-translation new-value classoid)))) - (cell - (clear-classoid name cell))) - (when (or (eq *boot-state* 'complete) - (eq *boot-state* 'braid)) - (update-ctors 'setf-find-class :class new-value :name name)) - new-value)) + (with-world-lock () + (let ((cell (find-classoid-cell name :create new-value))) + (cond (new-value + (setf (classoid-cell-pcl-class cell) new-value) + (when (eq **boot-state** 'complete) + (let ((classoid (class-classoid new-value))) + (setf (find-classoid name) classoid) + (%set-class-type-translation new-value classoid)))) + (cell + (%clear-classoid name cell))) + (when (or (eq **boot-state** 'complete) + (eq **boot-state** 'braid)) + (update-ctors 'setf-find-class :class new-value :name name)) + new-value))) (t (error "~S is not a legal class name." name))))