\f
;;;; PCL stuff
-(def!struct (std-classoid (:include classoid)
- (:constructor nil)))
-(def!struct (standard-classoid (:include std-classoid)
+;;; the CLASSOID that we use to represent type information for
+;;; STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS. The type system
+;;; side does not need to distinguish between STANDARD-CLASS and
+;;; FUNCALLABLE-STANDARD-CLASS.
+(def!struct (standard-classoid (:include classoid)
(:constructor make-standard-classoid)))
-(def!struct (random-pcl-classoid (:include std-classoid)
+;;; a metaclass for miscellaneous PCL structure-like objects (at the
+;;; moment, only CTOR objects).
+(def!struct (random-pcl-classoid (:include classoid)
(:constructor make-random-pcl-classoid)))
\f
;;;; built-in classes
(cond (owrap
(layout-classoid owrap))
((or (*subtypep (class-of class) *the-class-standard-class*)
+ (*subtypep (class-of class) *the-class-funcallable-standard-class*)
(typep class 'forward-referenced-class))
(cond ((and *pcl-class-boot*
(eq (slot-value class 'name) *pcl-class-boot*))
(make-standard-classoid :pcl-class class
:name (and (symbolp name) name))))))
(t
- (make-random-pcl-classoid :pcl-class class))))))
+ (bug "Got to T branch in ~S" 'make-wrapper))))))
(t
(let* ((found (find-classoid (slot-value class 'name)))
(layout (classoid-layout found)))
:slot-names (clos-slots name hash-code)
:boa-constructor %make-pcl-funcallable-instance
:superclass-name function
- :metaclass-name random-pcl-classoid
- :metaclass-constructor make-random-pcl-classoid
+ :metaclass-name standard-classoid
+ :metaclass-constructor make-standard-classoid
:dd-type funcallable-structure
;; Only internal implementation code will access these, and these
;; accesses (slot readers in particular) could easily be a
;; some class is forthcoming, because there are legitimate
;; questions one can ask of the type system, implemented in
;; terms of CLASSOIDs, involving forward-referenced classes. So.
- (let ((classoid (or (let ((layout (slot-value class 'wrapper)))
- (when layout (layout-classoid layout)))
- #+nil
- (find-classoid name nil)
- (make-standard-classoid
- :name (if (symbolp name) name nil))))
- (layout (make-wrapper 0 class)))
- (setf (layout-classoid layout) classoid)
- (setf (classoid-pcl-class classoid) class)
+ (let ((layout (make-wrapper 0 class)))
(setf (slot-value class 'wrapper) layout)
(let ((cpl (compute-preliminary-cpl class)))
(setf (layout-inherits layout)
(order-layout-inherits
(map 'simple-vector #'class-wrapper
(reverse (rest cpl))))))
- (register-layout layout :invalidate t)
- (setf (classoid-layout classoid) layout))))
+ (register-layout layout :invalidate t))))
(mapc #'make-preliminary-layout (class-direct-subclasses class)))))
;;; classes (including anonymous ones) and eql-specializers should be
;;; allowed to be specializers.
(defvar *anonymous-class*
- (make-instance 'standard-class
+ (make-instance 'standard-class
:direct-superclasses (list (find-class 'standard-object))))
(defvar *object-of-anonymous-class*
(make-instance *anonymous-class*))
(eval `(defmethod method-on-anonymous-class ((obj ,*anonymous-class*)) 41))
(assert (eql (method-on-anonymous-class *object-of-anonymous-class*) 41))
-(eval `(defmethod method-on-anonymous-class
- ((obj ,(intern-eql-specializer *object-of-anonymous-class*)))
+(eval `(defmethod method-on-anonymous-class
+ ((obj ,(intern-eql-specializer *object-of-anonymous-class*)))
42))
(assert (eql (method-on-anonymous-class *object-of-anonymous-class*) 42))
\f
+;;; accessors can cause early finalization, which caused confusion in
+;;; the system, leading to uncompileable TYPEP problems.
+(defclass funcallable-class-for-typep ()
+ ((some-slot-with-accessor :accessor some-slot-with-accessor))
+ (:metaclass funcallable-standard-class))
+(compile nil '(lambda (x) (typep x 'funcallable-class-for-typep)))
+\f
;;;; success
;;; 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.9.14.24"
+"0.9.14.25"