Changeset 285


Ignore:
Timestamp:
Jan 13, 2004, 5:06:25 PM (21 years ago)
Author:
Gary Byers
Message:

Recognize that SLOT-MISSING might return if it's specialized. Call it with
the symbol SETF, not '(SETF SLOT-VALUE).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-clos-boot.lisp

    r257 r285  
    176176           instance slot-id))
    177177(defun %slot-id-ref-missing (instance slot-id)
    178   (slot-missing (class-of instance) instance (slot-id.name slot-id) 'slot-value))
     178  (values (slot-missing (class-of instance) instance (slot-id.name slot-id) 'slot-value)))
    179179
    180180(defun %slot-id-set-obsolete (instance slot-id new-value)
     
    184184
    185185(defun %slot-id-set-missing (instance slot-id new-value)
    186   (slot-missing (class-of instance) instance (slot-id.name slot-id) '(setf slot-value) new-value))
     186  (slot-missing (class-of instance) instance (slot-id.name slot-id) 'setf new-value)
     187  new-value
     188  )
    187189
    188190
     
    550552    (when (and def (not (typep def 'generic-function)))
    551553      (cerror "Try to remove any global non-generic function or macro definition."
    552               "~s is defined as something other than a generic function." function-name)
     554              (make-condition 'simple-program-error :format-control "The functio ~s is defined as something other than a generic function." :format-arguments (list function-name)))
    553555      (fmakunbound function-name)
    554556      (setq def nil))
     
    10631065                 nil
    10641066                 nil
    1065                  #'(lambda (x y) (vanilla-union x y))
     1067                 #'(lambda (x y) (hierarchical-union2 x y))
    10661068                 nil
    1067                  #'(lambda (x y) (vanilla-intersection x y))
     1069                 #'(lambda (x y) (hierarchical-intersection2 x y))
    10681070                 nil
    10691071                 #'missing-type-method
     
    11011103(new-type-class 'foreign)
    11021104(new-type-class 'cons)
     1105(new-type-class 'intersection)
     1106(new-type-class 'negation)
    11031107(defparameter *class-type-class* (new-type-class 'class))
    11041108
     
    15851589(make-built-in-class 'foreign-ctype *ctype-class*)
    15861590(make-built-in-class 'class-ctype *ctype-class*)
     1591(make-built-in-class 'negation-ctype *ctype-class*)
     1592(make-built-in-class 'intersection-ctype *ctype-class*)
    15871593
    15881594
     
    22942300      (if slotd
    22952301        (slot-value-using-class class instance slotd)
    2296         (slot-missing class instance slot-name 'slot-value))))
     2302        (values (slot-missing class instance slot-name 'slot-value)))))
    22972303   
    22982304
     
    23202326        (if slotd
    23212327          (setf (slot-value-using-class class instance slotd) value)
    2322           (slot-missing class instance name '(setf slot-value) value))))
     2328          (progn           
     2329            (slot-missing class instance name 'setf value)
     2330            value))))
    23232331
    23242332(defsetf slot-value set-slot-value)
    23252333
    23262334(defun slot-makunbound (instance name)
    2327     (let* ((class (class-of instance))
    2328            (slotd (find-slotd name (%class-slots class))))
    2329       (if slotd
    2330         (slot-makunbound-using-class class instance slotd)
    2331         (slot-missing class instance name 'slot-makunbound))))
     2335  (let* ((class (class-of instance))
     2336         (slotd (find-slotd name (%class-slots class))))
     2337    (if slotd
     2338      (slot-makunbound-using-class class instance slotd)
     2339      (slot-missing class instance name 'slot-makunbound))
     2340    instance))
    23322341
    23332342(defun %std-slot-vector-boundp (slot-vector slotd)
     
    23592368    (if slotd
    23602369      (slot-boundp-using-class class instance slotd)
    2361       (slot-missing class instance name 'slot-boundp))))
     2370      (values (slot-missing class instance name 'slot-boundp)))))
    23622371
    23632372(defun slot-value-if-bound (instance name &optional default)
     
    26482657            (if bad-keys?
    26492658              (if errorp
    2650                 (error #'(lambda (stream key name class vect)
    2651                            (let ((*print-array* t))
    2652                              (format stream
    2653                                      "~s is an invalid initarg to ~s for ~s.~%~
     2659                (signal-program-error
     2660                 "~s is an invalid initarg to ~s for ~s.~%~
    26542661                                    Valid initargs: ~s."
    2655                                      key name class vect)))
    2656                        bad-key (function-name (car functions)) class initvect)
     2662                 bad-key
     2663                 (function-name (car functions))
     2664                 class (coerce initvect 'list))
    26572665                (values bad-keys? bad-key))))
    26582666        (if (eq initarg :allow-other-keys)
     
    30753083  (cond ((equal apo req) nil)
    30763084        ((not (eql (length apo) (length req)))
    3077          (error "Lengths of ~S and ~S differ." apo req))
     3085         (signal-program-error "Lengths of ~S and ~S differ." apo req))
    30783086        (t (let ((res nil))
    30793087             (dolist (arg apo (nreverse res))
Note: See TracChangeset for help on using the changeset viewer.