1.0.22.22: (SETF FIND-CLASSOID) to drop DEFTYPE lambda-lists and source-locations
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 1 Dec 2008 07:40:08 +0000 (07:40 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 1 Dec 2008 07:40:08 +0000 (07:40 +0000)
 * Going in despite the freeze, as this is a regression of sorts as of
   1.0.22.8.

 * Don't store early source-locations for defined types: use
   WITH-SOURCE-LOCATION to ensure we convert them to proper
   source-locations.

 Thanks to Tobias Ritterweiler for the heads-up.

src/code/class.lisp
src/compiler/compiler-deftype.lisp
tests/deftype.impure.lisp
version.lisp-expr

index 6639a3a..901713e 100644 (file)
              (error "Cannot redefine standard type ~S." name))
             (:defined
              (warn "Redefining DEFTYPE type to be a class: ~S" name)
-                (setf (info :type :expander name) nil)))
+                (setf (info :type :expander name) nil
+                      (info :type :lambda-list name) nil
+                      (info :type :source-location name) nil)))
 
           (remhash name table)
           (%note-type-defined name)
index f1453c0..6427570 100644 (file)
@@ -43,7 +43,7 @@
      (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))
index b11b982..ee43d3b 100644 (file)
 (defstruct foo)
 (assert (progn (deftype foo () 'integer)
                (null (find-class 'foo nil))
-               t))
\ No newline at end of file
+               t))
+
+;; Ensure that DEFCLASS after DEFTYPE nukes the lambda-list.
+(deftype bar (x) `(integer ,x))
+(assert (equal '(x) (sb-int:info :type :lambda-list 'bar)))
+(defclass bar () ())
+(assert (not (sb-int:info :type :lambda-list 'bar)))
index 9a4b1cc..a864fd6 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.22.21"
+"1.0.22.22"