Changeset 9349


Ignore:
Timestamp:
May 3, 2008, 11:58:04 AM (11 years ago)
Author:
gb
Message:

Split INSTANCE-SLOTS into the standard/non-standard cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-clos-boot.lisp

    r9131 r9349  
    2828
    2929
    30 (declaim (inline instance-slots))
     30(declaim (inline instance-slots %non-standard-instance-slots))
     31(defun %non-standard-instance-slots (instance typecode)
     32  (cond ((eql typecode target::subtag-macptr) (foreign-slots-vector instance))
     33        ((or (typep instance 'standard-generic-function)
     34             (typep instance 'funcallable-standard-object))
     35         (gf.slots instance))
     36        (t  (error "Don't know how to find slots of ~s" instance))))
     37
    3138(defun instance-slots (instance)
    3239  (let* ((typecode (typecode instance)))
    3340    (cond ((eql typecode target::subtag-instance) (instance.slots instance))
    34           ((eql typecode target::subtag-macptr) (foreign-slots-vector instance))
    35           ((or (typep instance 'standard-generic-function)
    36                (typep instance 'funcallable-standard-object))
    37            (gf.slots instance))
    38           (t  (error "Don't know how to find slots of ~s" instance)))))
     41          (t (%non-standard-instance-slots instance typecode)))))
     42
    3943
    4044(defun %class-name (class)
     
    11871191
    11881192(defvar %find-classes% (make-hash-table :test 'eq))
     1193
    11891194
    11901195(defun class-cell-typep (form class-cell)
Note: See TracChangeset for help on using the changeset viewer.