Changeset 14486


Ignore:
Timestamp:
04/29/13 22:26:48 (10 years ago)
Author:
rschlatte
Message:

reinstate argument type checking in fast reader methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r14485 r14486  
    22712271            (eq (type-of (car (std-method-specializers (car methods))))
    22722272                'standard-class))
    2273        (let ((slot-name (slot-definition-name (accessor-method-slot-definition
    2274                                                (first methods)))))
     2273       (let* ((method (first methods))
     2274              (slot-definition (std-slot-value method 'sys::%slot-definition))
     2275              (slot-name (std-slot-value slot-definition 'sys:name))
     2276              (class (car (std-method-specializers method))))
    22752277         #'(lambda (arg)
    2276              ;; this evades linear scan through slot names (see
    2277              ;; SLOT_VALUE in StandardObject.java)
     2278             ;; TODO: elide this test for low values of SAFETY
     2279             (unless (typep arg class) (no-applicable-method gf (list arg)))
     2280             ;; hash table lookup for slot position in Layout object via
     2281             ;; StandardObject.SLOT_VALUE, so should be reasonably fast
    22782282             (std-slot-value arg slot-name))))
    22792283
Note: See TracChangeset for help on using the changeset viewer.