Changeset 14495


Ignore:
Timestamp:
05/08/13 08:34:32 (9 years ago)
Author:
rschlatte
Message:

Remove StandardGenericFunction? class

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

Legend:

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

    r14493 r14495  
    5454  }
    5555
    56   static final StandardGenericFunction checkStandardGenericFunction(LispObject obj)
    57   {
    58     if (obj instanceof StandardGenericFunction)
    59       return (StandardGenericFunction) obj;
    60     return (StandardGenericFunction) // Not reached.
     56  static final FuncallableStandardObject checkStandardGenericFunction(LispObject obj)
     57  {
     58    if (obj instanceof FuncallableStandardObject)
     59      return (FuncallableStandardObject) obj;
     60    return (FuncallableStandardObject) // Not reached.
    6161      type_error(obj, Symbol.STANDARD_GENERIC_FUNCTION);
    6262  }
     
    136136    public LispObject execute(LispObject generic_function, LispObject eql_specializers)
    137137    {
    138       final StandardGenericFunction gf = checkStandardGenericFunction(generic_function);
     138      final FuncallableStandardObject gf = checkStandardGenericFunction(generic_function);
    139139      EMFCache cache = gf.cache;
    140140      cache.clearCache();
     
    162162                              LispObject third)
    163163    {
    164       final StandardGenericFunction gf = checkStandardGenericFunction(first);
     164      final FuncallableStandardObject gf = checkStandardGenericFunction(first);
    165165      EMFCache cache = gf.cache;
    166166      LispObject args = second;
     
    192192    public LispObject execute(LispObject first, LispObject second)
    193193    {
    194       final StandardGenericFunction gf = checkStandardGenericFunction(first);
     194      final FuncallableStandardObject gf = checkStandardGenericFunction(first);
    195195      EMFCache cache = gf.cache;
    196196      LispObject args = second;
  • trunk/abcl/src/org/armedbear/lisp/FuncallableStandardObject.java

    r14475 r14495  
    4343  LispObject function;
    4444
     45  // KLUDGE: this is only needed for generic functions, but doesn't hurt
     46  // to have it here.
     47  EMFCache cache = new EMFCache();
     48
    4549  protected FuncallableStandardObject()
    4650  {
     
    190194                               + arg.princToString() + ".");
    191195        }
     196        FuncallableStandardObject o = new FuncallableStandardObject((Layout)l);
    192197        if (arg == StandardClass.STANDARD_GENERIC_FUNCTION || Symbol.SUBTYPEP.execute(arg, StandardClass.STANDARD_GENERIC_FUNCTION) != NIL) {
    193           return new StandardGenericFunction((Layout)l);
    194         } else {
    195           return new FuncallableStandardObject((Layout)l);
     198          // KLUDGE: this initialization should be moved Lisp-side
     199          o.setInstanceSlotValue(Symbol.NAME, NIL);
     200          o.setInstanceSlotValue(Symbol.LAMBDA_LIST, NIL);
     201          o.setInstanceSlotValue(Symbol.REQUIRED_ARGS, NIL);
     202          o.setInstanceSlotValue(Symbol.OPTIONAL_ARGS, NIL);
     203          o.setInstanceSlotValue(Symbol.INITIAL_METHODS, NIL);
     204          o.setInstanceSlotValue(Symbol.METHODS, NIL);
     205          o.setInstanceSlotValue(Symbol.METHOD_CLASS, StandardClass.STANDARD_METHOD);
     206          // method combination class set by clos.lisp:shared-initialize :after
     207          o.setInstanceSlotValue(Symbol._METHOD_COMBINATION, list(Symbol.STANDARD));
     208          o.setInstanceSlotValue(Symbol.ARGUMENT_PRECEDENCE_ORDER, NIL);
     209          o.setInstanceSlotValue(Symbol.DECLARATIONS, NIL);
     210          o.setInstanceSlotValue(Symbol._DOCUMENTATION, NIL);
    196211        }
     212        return o;
    197213      }
    198214      return type_error(arg, Symbol.FUNCALLABLE_STANDARD_CLASS);
Note: See TracChangeset for help on using the changeset viewer.