Changeset 10377


Ignore:
Timestamp:
Aug 6, 2008, 11:50:21 AM (11 years ago)
Author:
gb
Message:

Split INSTANCE-SLOTS into (inlineable) standard case, non-standard case.

File:
1 edited

Legend:

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

    r10376 r10377  
    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)))))
    3942
    4043(defun %class-name (class)
Note: See TracChangeset for help on using the changeset viewer.