Changeset 14475


Ignore:
Timestamp:
04/24/13 12:51:05 (9 years ago)
Author:
rschlatte
Message:

Remove StandardGenericFunctionClass?.java

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
1 deleted
3 edited

Legend:

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

    r14468 r14475  
    190190                               + arg.princToString() + ".");
    191191        }
    192         if (Symbol.SUBTYPEP.execute(arg, StandardClass.STANDARD_GENERIC_FUNCTION) != NIL) {
     192        if (arg == StandardClass.STANDARD_GENERIC_FUNCTION || Symbol.SUBTYPEP.execute(arg, StandardClass.STANDARD_GENERIC_FUNCTION) != NIL) {
    193193          return new StandardGenericFunction((Layout)l);
    194194        } else {
  • trunk/abcl/src/org/armedbear/lisp/StandardClass.java

    r14473 r14475  
    110110      };
    111111
     112  static Layout layoutStandardGenericFunction =
     113      new Layout(null,
     114                 list(Symbol.NAME,
     115                      Symbol.LAMBDA_LIST,
     116                      Symbol.REQUIRED_ARGS,
     117                      Symbol.OPTIONAL_ARGS,
     118                      Symbol.INITIAL_METHODS,
     119                      Symbol.METHODS,
     120                      Symbol.METHOD_CLASS,
     121                      Symbol._METHOD_COMBINATION,
     122                      Symbol.ARGUMENT_PRECEDENCE_ORDER,
     123                      Symbol.DECLARATIONS,
     124                      Symbol.CLASSES_TO_EMF_TABLE,
     125                      Symbol._DOCUMENTATION),
     126                 NIL)
     127      {
     128        @Override
     129        public LispClass getLispClass()
     130        {
     131          return STANDARD_GENERIC_FUNCTION;
     132        }
     133      };
     134
    112135 
    113136
     
    580603
    581604  public static final StandardClass STANDARD_GENERIC_FUNCTION =
    582     new StandardGenericFunctionClass();
    583   static
    584   {
    585     addClass(Symbol.STANDARD_GENERIC_FUNCTION, STANDARD_GENERIC_FUNCTION);
    586   }
     605    addFuncallableStandardClass(Symbol.STANDARD_GENERIC_FUNCTION,
     606                                list(GENERIC_FUNCTION));
    587607
    588608  public static void initializeStandardClasses()
     
    829849
    830850    // STANDARD-GENERIC-FUNCTION
    831     Debug.assertTrue(STANDARD_GENERIC_FUNCTION.isFinalized());
     851    STANDARD_GENERIC_FUNCTION.setClassLayout(layoutStandardGenericFunction);
    832852    STANDARD_GENERIC_FUNCTION.setCPL(STANDARD_GENERIC_FUNCTION,
    833853                                     GENERIC_FUNCTION, METAOBJECT,
     
    853873                              list(internKeyword("DOCUMENTATION")))));
    854874    // There are no inherited slots.
    855     STANDARD_GENERIC_FUNCTION.setSlotDefinitions(STANDARD_GENERIC_FUNCTION.getDirectSlotDefinitions());
     875    // STANDARD_GENERIC_FUNCTION.setSlotDefinitions(STANDARD_GENERIC_FUNCTION.getDirectSlotDefinitions());
     876    STANDARD_GENERIC_FUNCTION.finalizeClass();
    856877  }
    857878}
  • trunk/abcl/src/org/armedbear/lisp/StandardObject.java

    r14469 r14475  
    671671      if (arg == StandardClass.STANDARD_CLASS) {
    672672        return new StandardClass();
    673       } else if (arg instanceof StandardGenericFunctionClass) {
     673      } else if (arg == StandardClass.STANDARD_GENERIC_FUNCTION) {
     674        // Not checking for (subtypep arg standard-generic-function)
     675        // here, since allocate-instance is only called for generic
     676        // functions early in the boot process and subtypep isn't
     677        // working yet.  allocate-funcallable-instance takes over later.
    674678        return new StandardGenericFunction();
    675679      } else if (arg instanceof FuncallableStandardClass) {
Note: See TracChangeset for help on using the changeset viewer.