Changeset 151


Ignore:
Timestamp:
Dec 20, 2003, 4:17:07 AM (21 years ago)
Author:
Gary Byers
Message:

Punt on primary accessor methods.

Location:
trunk/ccl/level-1
Files:
2 edited

Legend:

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

    r115 r151  
    14831483(defvar *accessor-method-class* (make-standard-class 'standard-accessor-method *standard-method-class*))
    14841484(defvar *standard-reader-method-class* (make-standard-class 'standard-reader-method *accessor-method-class*))
    1485 (defvar *primary-reader-method-class* (make-standard-class 'primary-reader-method *standard-reader-method-class*))
    14861485(defvar *standard-writer-method-class* (make-standard-class 'standard-writer-method *accessor-method-class*))
    1487 (defvar *primary-writer-method-class* (make-standard-class 'primary-writer-method *standard-writer-method-class*))
    14881486(defvar *method-function-class* (make-standard-class 'method-function *function-class*))
    14891487(defvar *interpreted-method-function-class*
     
    19821980           (dpb 2 $lfbits-numreq (ash 1 $lfbits-method-bit))))
    19831981
    1984 (defmethod create-reader-method-function ((class std-class)
    1985                                           (reader-method-class primary-reader-method)
    1986                                           (dslotd standard-direct-slot-definition))
    1987   (let* ((offset
    1988           (primary-class-slot-offset class (%slot-definition-name dslotd)))
    1989          (f (nfunction primary-reader-method (lambda (i)
    1990                 (when (eql (%wrapper-hash-index (instance.class-wrapper i)) 0)
    1991                   (update-obsolete-instance i))
    1992                 (standard-instance-instance-location-access i offset)))))
    1993     (inner-lfun-bits f
    1994                      (logior (ash 1 $lfbits-method-bit)
    1995                              (the fixnum (inner-lfun-bits f))))
    1996     f))
    1997 
    1998 (defmethod create-writer-method-function ((class std-class)
    1999                                           (writer-method-class primary-writer-method)
    2000                                           (dslotd standard-direct-slot-definition))
    2001   (let* ((offset (primary-class-slot-offset class
    2002                                             (%slot-definition-name dslotd)))
    2003          (f
    2004           (nfunction primary-writer-method
    2005                      (lambda (new i)
    2006                        (when (eql
    2007                               (%wrapper-hash-index
    2008                                (instance.class-wrapper i))
    2009                               0)
    2010                          (update-obsolete-instance i))
    2011                        (setf
    2012                         (standard-instance-instance-location-access i offset)
    2013                         new)))))
    2014     (inner-lfun-bits f
    2015                      (logior (ash 1 $lfbits-method-bit)
    2016                              (the fixnum (inner-lfun-bits f))))
    2017     f))
    2018                      
    2019 
    2020 
    20211982
    20221983
  • trunk/ccl/level-1/l1-clos.lisp

    r120 r151  
    737737                                &rest initargs)
    738738  (declare (ignore initargs))
    739   (if (primary-class-slot-offset class (%slot-definition-name dslotd))
    740     *primary-reader-method-class*
    741     *standard-reader-method-class*))
     739  *standard-reader-method-class*)
    742740
    743741(defmethod reader-method-class ((class funcallable-standard-class)
     
    745743                                &rest initargs)
    746744  (declare (ignore  initargs))
    747   (if (primary-class-slot-offset class (%slot-definition-name dslotd))
    748     *primary-reader-method-class*
    749     *standard-reader-method-class*))
     745  *standard-reader-method-class*)
    750746
    751747(defmethod add-reader-method ((class std-class) gf dslotd)
     
    774770                                &rest initargs)
    775771  (declare (ignore initargs))
    776   (if (primary-class-slot-offset class (%slot-definition-name dslotd))
    777     *primary-writer-method-class*
    778     *standard-writer-method-class*))
     772  *standard-writer-method-class*)
    779773
    780774(defmethod writer-method-class ((class funcallable-standard-class)
     
    782776                                &rest initargs)
    783777  (declare (ignore initargs))
    784   (if (primary-class-slot-offset class (%slot-definition-name dslotd))
    785     *primary-writer-method-class*
    786     *standard-writer-method-class*))
     778  *standard-writer-method-class*)
    787779
    788780
Note: See TracChangeset for help on using the changeset viewer.