"*TYPE-SYSTEM-INITIALIZED*" "FIND-LAYOUT"
"DSD-NAME" "%TYPEP" "DD-RAW-INDEX"
"DD-NAME" "CLASSOID-SUBCLASSES"
- "CLASSOID-LAYOUT" "CLASSOID-NAME"
+ "CLASSOID-LAYOUT" "CLASSOID-NAME" "CLASSOID-P"
"DD-RAW-LENGTH" "NOTE-NAME-DEFINED"
"%CODE-CODE-SIZE" "DD-SLOTS"
"DD-INCLUDE" "SLOT-SETTER-LAMBDA-FORM"
(defun type-of (object)
#!+sb-doc
"Return the type of OBJECT."
- (if (typep object '(or function array complex))
- (type-specifier (ctype-of object))
- (let* ((classoid (layout-classoid (layout-of object)))
- (name (classoid-name classoid)))
- (if (typep object 'instance)
- (case name
- (sb!alien-internals:alien-value
- `(sb!alien:alien
- ,(sb!alien-internals:unparse-alien-type
- (sb!alien-internals:alien-value-type object))))
- (t
- (classoid-proper-name classoid)))
- name))))
+ (typecase object
+ (fixnum
+ (cond
+ ((<= 0 object 1) 'bit)
+ ((< object 0) 'fixnum)
+ (t '(integer 0 #.sb!xc:most-positive-fixnum))))
+ (integer
+ (if (>= object 0)
+ '(integer #.(1+ sb!xc:most-positive-fixnum))
+ 'bignum))
+ (standard-char 'standard-char)
+ ((member t) 'boolean)
+ (keyword 'keyword)
+ ((or array complex) (type-specifier (ctype-of object)))
+ (t
+ (let* ((classoid (layout-classoid (layout-of object)))
+ (name (classoid-name classoid)))
+ (if (typep object 'instance)
+ (case name
+ (sb!alien-internals:alien-value
+ `(sb!alien:alien
+ ,(sb!alien-internals:unparse-alien-type
+ (sb!alien-internals:alien-value-type object))))
+ (t
+ (let ((pname (classoid-proper-name classoid)))
+ (if (classoid-p pname)
+ (classoid-pcl-class pname)
+ pname))))
+ name)))))
\f
;;;; equality predicates
(set-dfun gf dfun cache info) ; lest the cache be freed twice
(update-dfun gf dfun cache info))))))
\f
+(defmethod (setf class-name) :before (new-value (class class))
+ (let ((classoid (find-classoid (class-name class))))
+ (setf (classoid-name classoid) new-value)))
+\f
(defmethod function-keywords ((method standard-method))
(multiple-value-bind (nreq nopt keysp restp allow-other-keys-p keywords)
(analyze-lambda-list (if (consp method)
;;; 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".)
-"0.8.0.50"
+"0.8.0.51"