Changeset 9712


Ignore:
Timestamp:
Jun 9, 2008, 11:16:40 AM (12 years ago)
Author:
gb
Message:

Use the wrapper (not the class) to determine applicability in
SINGLETON-READER-DCODE. Might save an indirection or two; speeding
this up more likely involves making unique functions and avoiding
use of the dispatch table.

File:
1 edited

Legend:

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

    r9706 r9712  
    18351835(defun singleton-reader-dcode (dt instance)
    18361836  (declare (optimize (speed 3) (safety 0)))
    1837   (let* ((class (%svref dt %gf-dispatch-table-first-data))
     1837  (let* ((wrapper (%svref dt %gf-dispatch-table-first-data))
    18381838         (location (%svref dt (1+ %gf-dispatch-table-first-data))))
    18391839    (if (eq (if (eq (typecode instance) target::subtag-instance)
    1840               (%class-of-instance instance))
    1841             class)
     1840              (instance.class-wrapper instance))
     1841            wrapper)
    18421842      (%slot-ref (instance.slots instance) location)
    18431843      (no-applicable-method (%gf-dispatch-table-gf dt) instance))))
     
    20172017                       ;; Method is only applicable to a single class.
    20182018                       (destructuring-bind (class . location) (car alist)
    2019                          (setf (%svref dt %gf-dispatch-table-first-data) class
     2019                         (setf (%svref dt %gf-dispatch-table-first-data) (%class.own-wrapper class)
    20202020                               (%svref dt (1+ %gf-dispatch-table-first-data)) location
    20212021                               (gf.dcode f) (dcode-for-gf f #'singleton-reader-dcode))))
Note: See TracChangeset for help on using the changeset viewer.