X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fcompiler-deftype.lisp;h=24aeaa31096230341f3cb6203ddf4b3b4a8be381;hb=a8419eb994f3b59b70cfa12e1004711a830a43fa;hp=c0309740cfa79be900eaf3a8d3350799b7c76c32;hpb=45043cae0617dd0f8071e97cd9ee2d6359a9f9e9;p=sbcl.git diff --git a/src/compiler/compiler-deftype.lisp b/src/compiler/compiler-deftype.lisp index c030974..24aeaa3 100644 --- a/src/compiler/compiler-deftype.lisp +++ b/src/compiler/compiler-deftype.lisp @@ -22,7 +22,8 @@ (error "illegal to redefine standard type: ~S" name))) (:instance (warn "The class ~S is being redefined to be a DEFTYPE." name) - (undefine-structure (layout-info (classoid-layout (find-classoid name)))) + (undeclare-structure (find-classoid name) t) + ;; FIXME: shouldn't this happen only at eval-time? (setf (classoid-cell-classoid (find-classoid-cell name :create t)) nil) (setf (info :type :compiler-layout name) nil) (setf (info :type :kind name) :defined)) @@ -42,15 +43,11 @@ (setf (info :type :kind name) :defined))) (setf (info :type :expander name) expander (info :type :lambda-list name) lambda-list) - (when source-location + (sb!c:with-source-location (source-location) (setf (info :type :source-location name) source-location)) (when doc (setf (fdocumentation name 'type) doc)) - ;; ### Bootstrap hack -- we need to define types before %NOTE-TYPE-DEFINED - ;; is defined. (FIXME: Do we still need to do this? -- WHN 19990310) - (if (fboundp 'sb!c::%note-type-defined) - (sb!c::%note-type-defined name) - (warn "defining type before %NOTE-TYPE-DEFINED is defined")) + (sb!c::%note-type-defined name) name) (/show0 "compiler-deftype.lisp end of file")