Changeset 14007


Ignore:
Timestamp:
07/13/12 16:44:19 (8 years ago)
Author:
rschlatte
Message:

Move definition of subclasses of standard-method metaclass to Lisp

  • standard-accessor-method
  • standard-reader-method
  • standard-writer-method
Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

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

    r14006 r14007  
    616616  public static final StandardClass STANDARD_METHOD =
    617617    addStandardClass(Symbol.STANDARD_METHOD, list(METHOD));
    618 
    619   public static final StandardClass STANDARD_ACCESSOR_METHOD =
    620     addStandardClass(Symbol.STANDARD_ACCESSOR_METHOD, list(STANDARD_METHOD));
    621 
    622   public static final StandardClass STANDARD_READER_METHOD =
    623       addStandardClass(Symbol.STANDARD_READER_METHOD, list(STANDARD_ACCESSOR_METHOD));
    624 
    625   public static final StandardClass STANDARD_WRITER_METHOD =
    626       addStandardClass(Symbol.STANDARD_WRITER_METHOD, list(STANDARD_ACCESSOR_METHOD));
    627618
    628619  public static final StandardClass STANDARD_GENERIC_FUNCTION =
     
    739730           new SlotDefinition(Symbol._DOCUMENTATION, NIL, constantlyNil,
    740731                              list(internKeyword("DOCUMENTATION")))));
    741     STANDARD_ACCESSOR_METHOD.setCPL(STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
    742                                     METHOD, METAOBJECT, STANDARD_OBJECT,
    743                                     BuiltInClass.CLASS_T);
    744     STANDARD_ACCESSOR_METHOD.setDirectSlotDefinitions(
    745       list(new SlotDefinition(Symbol._SLOT_DEFINITION, NIL, constantlyNil,
    746                               list(internKeyword("SLOT-DEFINITION")))));
    747     STANDARD_READER_METHOD.setCPL(STANDARD_READER_METHOD,
    748                                   STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
    749                                   METHOD, METAOBJECT, STANDARD_OBJECT,
    750                                   BuiltInClass.CLASS_T);
    751     STANDARD_WRITER_METHOD.setCPL(STANDARD_WRITER_METHOD,
    752                                   STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
    753                                   METHOD, METAOBJECT, STANDARD_OBJECT,
    754                                   BuiltInClass.CLASS_T);
    755732    PACKAGE_ERROR.setCPL(PACKAGE_ERROR, ERROR, SERIOUS_CONDITION, CONDITION,
    756733                         STANDARD_OBJECT, BuiltInClass.CLASS_T);
     
    852829    METHOD.finalizeClass();
    853830    STANDARD_METHOD.finalizeClass();
    854     STANDARD_ACCESSOR_METHOD.finalizeClass();
    855     STANDARD_READER_METHOD.finalizeClass();
    856     STANDARD_WRITER_METHOD.finalizeClass();
    857831    SPECIALIZER.finalizeClass();
    858832    CLASS.finalizeClass();
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r14006 r14007  
    31513151  public static final Symbol QUALIFIERS =
    31523152    PACKAGE_SYS.addInternalSymbol("QUALIFIERS");
    3153   public static final Symbol _SLOT_DEFINITION =
    3154     PACKAGE_SYS.addInternalSymbol("%SLOT-DEFINITION");
    31553153  public static final Symbol _SOURCE =
    31563154    PACKAGE_SYS.addInternalSymbol("%SOURCE");
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r14006 r14007  
    119119(defconstant +the-forward-referenced-class+
    120120  (find-class 'forward-referenced-class))
    121 (defconstant +the-standard-reader-method-class+
    122   (find-class 'standard-reader-method))
    123 (defconstant +the-standard-writer-method-class+
    124   (find-class 'standard-writer-method))
    125121(defconstant +the-standard-generic-function-class+
    126122  (find-class 'standard-generic-function))
     
    201197    (add-subclasses 'generic-function 'standard-generic-function)
    202198    (add-subclasses 'method 'standard-method)
    203     (add-subclasses 'standard-method 'standard-accessor-method)
    204     (add-subclasses 'standard-accessor-method
    205                     '(standard-reader-method standard-writer-method))
    206199    (add-subclasses 'slot-definition
    207200                    '(direct-slot-definition effective-slot-definition
     
    926919   declarations
    927920   forms))
     921
     922(define-primordial-class standard-accessor-method (standard-method)
     923  ((sys::%slot-definition :initarg :slot-definition :initform nil)))
     924
     925(define-primordial-class standard-reader-method (standard-accessor-method)
     926  ())
     927(defconstant +the-standard-reader-method-class+
     928  (find-class 'standard-reader-method))
     929
     930(define-primordial-class standard-writer-method (standard-accessor-method)
     931  ())
     932(defconstant +the-standard-writer-method-class+
     933  (find-class 'standard-writer-method))
     934
    928935
    929936(defvar *extensible-built-in-classes*
Note: See TracChangeset for help on using the changeset viewer.