Changeset 14079


Ignore:
Timestamp:
08/13/12 13:22:17 (9 years ago)
Author:
rschlatte
Message:

Don't overwrite existing attributes in ensure-generic-function

  • also add initargs :method-combination, :documentation for generic functions
Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

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

    r14018 r14079  
    866866                                     BuiltInClass.FUNCTION,
    867867                                     BuiltInClass.CLASS_T);
    868     STANDARD_GENERIC_FUNCTION.setDirectSlotDefinitions(STANDARD_GENERIC_FUNCTION.getClassLayout().generateSlotDefinitions());
     868    STANDARD_GENERIC_FUNCTION.setDirectSlotDefinitions(
     869      list(new SlotDefinition(PACKAGE_SYS.intern("NAME"), NIL, constantlyNil),
     870           new SlotDefinition(PACKAGE_SYS.intern("LAMBDA-LIST"), NIL,
     871                              constantlyNil),
     872           new SlotDefinition(PACKAGE_SYS.intern("REQUIRED-ARGS"), NIL,
     873                              constantlyNil),
     874           new SlotDefinition(PACKAGE_SYS.intern("OPTIONAL-ARGS"), NIL,
     875                              constantlyNil),
     876           new SlotDefinition(PACKAGE_SYS.intern("INITIAL-METHODS"), NIL,
     877                              constantlyNil),
     878           new SlotDefinition(PACKAGE_SYS.intern("METHODS"), NIL,
     879                              constantlyNil),
     880           new SlotDefinition(PACKAGE_SYS.intern("METHOD-CLASS"), NIL,
     881                              constantlyNil),
     882           new SlotDefinition(PACKAGE_SYS.intern("%METHOD-COMBINATION"), NIL,
     883                              constantlyNil,
     884                              list(internKeyword("METHOD-COMBINATION"))),
     885           new SlotDefinition(PACKAGE_SYS.intern("ARGUMENT-PRECEDENCE-ORDER"),
     886                              NIL, constantlyNil),
     887           new SlotDefinition(PACKAGE_SYS.intern("DECLARATIONS"), NIL,
     888                              constantlyNil),
     889           new SlotDefinition(PACKAGE_SYS.intern("CLASSES-TO-EMF-TABLE"), NIL,
     890                              constantlyNil),
     891           new SlotDefinition(Symbol._DOCUMENTATION, NIL, constantlyNil,
     892                              list(internKeyword("DOCUMENTATION")))));
    869893    // There are no inherited slots.
    870894    STANDARD_GENERIC_FUNCTION.setSlotDefinitions(STANDARD_GENERIC_FUNCTION.getDirectSlotDefinitions());
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r14060 r14079  
    44944494     function-name
    44954495     &rest all-keys
    4496      &key (generic-function-class +the-standard-generic-function-class+)
     4496     &key (generic-function-class (class-of generic-function))
    44974497     (lambda-list nil lambda-list-supplied-p)
    4498      (method-class +the-standard-method-class+)
    4499      (method-combination +the-standard-method-combination+)
     4498     (method-class (generic-function-method-class generic-function))
     4499     (method-combination (generic-function-method-combination generic-function))
    45004500     &allow-other-keys)
    45014501  (setf all-keys (copy-list all-keys))  ; since we modify it
Note: See TracChangeset for help on using the changeset viewer.