X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fcache.lisp;h=bdb7811ecb36878e9a2234d6be8f96a3a262c08c;hb=bb8121bf453353ce2cadc85d9be7be05ca6248ff;hp=cf62b4938505f8cd66ca7e7a008e8f9de062396a;hpb=258637fa16b01f57f3015955abf32976b618513f;p=sbcl.git diff --git a/src/pcl/cache.lisp b/src/pcl/cache.lisp index cf62b49..bdb7811 100644 --- a/src/pcl/cache.lisp +++ b/src/pcl/cache.lisp @@ -557,21 +557,26 @@ (logand mask result) (the fixnum (1+ (logand mask result)))))) -;;; NIL means nothing so far, no actual arg info has NILs -;;; in the metatype -;;; CLASS seen all sorts of metaclasses -;;; (specifically, more than one of the next 4 values) -;;; T means everything so far is the class T -;;; STANDARD-CLASS seen only standard classes -;;; BUILT-IN-CLASS seen only built in classes -;;; STRUCTURE-CLASS seen only structure classes +;;; NIL: means nothing so far, no actual arg info has NILs in the +;;; metatype +;;; +;;; CLASS: seen all sorts of metaclasses (specifically, more than one +;;; of the next 5 values) or else have seen something which doesn't +;;; fall into a single category (SLOT-INSTANCE, FORWARD). +;;; +;;; T: means everything so far is the class T +;;; STANDARD-INSTANCE: seen only standard classes +;;; BUILT-IN-INSTANCE: seen only built in classes +;;; STRUCTURE-INSTANCE: seen only structure classes +;;; CONDITION-INSTANCE: seen only condition classes (defun raise-metatype (metatype new-specializer) (let ((slot (find-class 'slot-class)) (standard (find-class 'standard-class)) (fsc (find-class 'funcallable-standard-class)) (condition (find-class 'condition-class)) (structure (find-class 'structure-class)) - (built-in (find-class 'built-in-class))) + (built-in (find-class 'built-in-class)) + (frc (find-class 'forward-referenced-class))) (flet ((specializer->metatype (x) (let ((meta-specializer (if (eq *boot-state* 'complete) @@ -585,18 +590,19 @@ ((*subtypep meta-specializer structure) 'structure-instance) ((*subtypep meta-specializer built-in) 'built-in-instance) ((*subtypep meta-specializer slot) 'slot-instance) + ((*subtypep meta-specializer frc) 'forward) (t (error "~@" - new-specializer - meta-specializer)))))) + new-specializer meta-specializer)))))) ;; We implement the following table. The notation is ;; that X and Y are distinct meta specializer names. ;; - ;; NIL ===> - ;; X X ===> X - ;; X Y ===> CLASS + ;; NIL ===> + ;; X X ===> X + ;; X Y ===> CLASS (let ((new-metatype (specializer->metatype new-specializer))) (cond ((eq new-metatype 'slot-instance) 'class) + ((eq new-metatype 'forward) 'class) ((null metatype) new-metatype) ((eq metatype new-metatype) new-metatype) (t 'class))))))