Changeset 9559


Ignore:
Timestamp:
May 20, 2008, 8:25:56 PM (11 years ago)
Author:
gb
Message:

Our friend the (class :simple-subtypep) method has to check for
the case where class1 is forward-referenced and return (values nil nil)
in that case.

If the bitvector trick failed and class1 is a foreign class, we can't
win; exploit that to make the forward-referenced-class-p check a bit
faster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/level-1/l1-typesys.lisp

    r9535 r9559  
    34593459                      (not (eql 0 (sbit bits1 ordinal2))))
    34603460                    t))
    3461           (if (memq class2 (class-direct-superclasses class1))
    3462             (values t t)
    3463             ;; %INITED-CLASS-CPL will return NIL if class1 can't
    3464             ;; be finalized; in that case, we don't know the answer.
    3465             (let ((supers (%inited-class-cpl class1 t)))
    3466               (if (memq class2 supers)
    3467                 (values t t)
    3468                 (values nil (not (null supers))))))))
     3461          (if (%standard-instance-p class1)
     3462            (if (memq class2 (%class.local-supers class1))
     3463              (values t t)
     3464              (if (eq (%class-of-instance class1)
     3465                      *forward-referenced-class-class*)
     3466                (values nil nil)
     3467                ;; %INITED-CLASS-CPL will return NIL if class1 can't
     3468                ;; be finalized; in that case, we don't know the answer.
     3469                (let ((supers (%inited-class-cpl class1)))
     3470                  (if (memq class2 supers)
     3471                    (values t t)
     3472                    (values nil (not (null supers)))))))
     3473            (values nil t))))
    34693474      (values nil t))))
    34703475
Note: See TracChangeset for help on using the changeset viewer.