Changeset 14006


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

Move method-combination metaclass definitions into Lisp

  • method-combination
  • long-method-combination
  • short-method-combination
Location:
trunk/abcl/src/org/armedbear/lisp
Files:
4 edited

Legend:

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

    r14004 r14006  
    491491    addClass(Symbol.GENERIC_FUNCTION, GENERIC_FUNCTION);
    492492  }
    493 
    494   public static final StandardClass METHOD_COMBINATION =
    495     addStandardClass(Symbol.METHOD_COMBINATION, list(METAOBJECT));
    496 
    497   public static final StandardClass SHORT_METHOD_COMBINATION =
    498     addStandardClass(Symbol.SHORT_METHOD_COMBINATION, list(METHOD_COMBINATION));
    499 
    500   public static final StandardClass LONG_METHOD_COMBINATION =
    501     addStandardClass(Symbol.LONG_METHOD_COMBINATION, list(METHOD_COMBINATION));
    502493
    503494  public static final StandardClass CLASS =
     
    762753                                  METHOD, METAOBJECT, STANDARD_OBJECT,
    763754                                  BuiltInClass.CLASS_T);
    764     METHOD_COMBINATION.setCPL(METHOD_COMBINATION, METAOBJECT, STANDARD_OBJECT,
    765                               BuiltInClass.CLASS_T);
    766     METHOD_COMBINATION.setDirectSlotDefinitions(
    767       list(new SlotDefinition(Symbol.NAME,
    768                               list(Symbol.METHOD_COMBINATION_NAME),
    769                               constantlyNil),
    770            new SlotDefinition(Symbol._DOCUMENTATION,
    771                               list(Symbol.METHOD_COMBINATION_DOCUMENTATION),
    772                               constantlyNil, list(internKeyword("DOCUMENTATION"))),
    773            new SlotDefinition(PACKAGE_MOP.intern("OPTIONS"),
    774                               NIL, constantlyNil,
    775                               list(internKeyword("OPTIONS")))));
    776     SHORT_METHOD_COMBINATION.setCPL(SHORT_METHOD_COMBINATION,
    777                                     METHOD_COMBINATION, METAOBJECT,
    778                                     STANDARD_OBJECT, BuiltInClass.CLASS_T);
    779     SHORT_METHOD_COMBINATION.setDirectSlotDefinitions(
    780       list(new SlotDefinition(Symbol.OPERATOR,
    781                               list(Symbol.SHORT_METHOD_COMBINATION_OPERATOR)),
    782            new SlotDefinition(Symbol.IDENTITY_WITH_ONE_ARGUMENT,
    783                               list(Symbol.SHORT_METHOD_COMBINATION_IDENTITY_WITH_ONE_ARGUMENT))));
    784     LONG_METHOD_COMBINATION.setCPL(LONG_METHOD_COMBINATION,
    785                                    METHOD_COMBINATION, METAOBJECT,
    786                                    STANDARD_OBJECT, BuiltInClass.CLASS_T);
    787     LONG_METHOD_COMBINATION.setDirectSlotDefinitions(
    788       list(new SlotDefinition(Symbol.LAMBDA_LIST,
    789                               list(Symbol.LONG_METHOD_COMBINATION_LAMBDA_LIST)),
    790            new SlotDefinition(Symbol.METHOD_GROUP_SPECS,
    791                               list(Symbol.LONG_METHOD_COMBINATION_METHOD_GROUP_SPECS)),
    792            new SlotDefinition(Symbol.ARGS_LAMBDA_LIST,
    793                               list(Symbol.LONG_METHOD_COMBINATION_ARGS_LAMBDA_LIST)),
    794            new SlotDefinition(Symbol.GENERIC_FUNCTION_SYMBOL,
    795                               list(Symbol.LONG_METHOD_COMBINATION_GENERIC_FUNCTION_SYMBOL)),
    796            new SlotDefinition(Symbol.FUNCTION,
    797                               list(Symbol.LONG_METHOD_COMBINATION_FUNCTION)),
    798            new SlotDefinition(Symbol.ARGUMENTS,
    799                               list(Symbol.LONG_METHOD_COMBINATION_ARGUMENTS)),
    800            new SlotDefinition(Symbol.DECLARATIONS,
    801                               list(Symbol.LONG_METHOD_COMBINATION_DECLARATIONS)),
    802            new SlotDefinition(Symbol.FORMS,
    803                               list(Symbol.LONG_METHOD_COMBINATION_FORMS))));
    804 
    805755    PACKAGE_ERROR.setCPL(PACKAGE_ERROR, ERROR, SERIOUS_CONDITION, CONDITION,
    806756                         STANDARD_OBJECT, BuiltInClass.CLASS_T);
     
    908858    CLASS.finalizeClass();
    909859    BUILT_IN_CLASS.finalizeClass();
    910     METHOD_COMBINATION.finalizeClass();
    911     SHORT_METHOD_COMBINATION.finalizeClass();
    912     LONG_METHOD_COMBINATION.finalizeClass();
    913860    PACKAGE_ERROR.finalizeClass();
    914861    PARSE_ERROR.finalizeClass();
  • trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java

    r13970 r14006  
    6767        pkg.intern("%METHOD-COMBINATION"),
    6868        pkg.intern("ARGUMENT-PRECEDENCE-ORDER"),
    69         Symbol.DECLARATIONS,
     69        pkg.intern("DECLARATIONS"),
    7070        pkg.intern("CLASSES-TO-EMF-TABLE"),
    7171        Symbol._DOCUMENTATION
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r13967 r14006  
    29782978  public static final Symbol GENERIC_FUNCTION_METHODS =
    29792979    PACKAGE_MOP.addExternalSymbol("GENERIC-FUNCTION-METHODS");
    2980   public static final Symbol SHORT_METHOD_COMBINATION =
    2981     PACKAGE_MOP.addInternalSymbol("SHORT-METHOD-COMBINATION");
    2982   public static final Symbol LONG_METHOD_COMBINATION =
    2983     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION");
    29842980  public static final Symbol METAOBJECT =
    29852981    PACKAGE_MOP.addExternalSymbol("METAOBJECT");
     
    30073003  public static final Symbol METHOD_COMBINATION_DOCUMENTATION =
    30083004    PACKAGE_MOP.addInternalSymbol("METHOD-COMBINATION-DOCUMENTATION");
    3009   public static final Symbol SHORT_METHOD_COMBINATION_OPERATOR =
    3010     PACKAGE_MOP.addInternalSymbol("SHORT-METHOD-COMBINATION-OPERATOR");
    3011   public static final Symbol SHORT_METHOD_COMBINATION_IDENTITY_WITH_ONE_ARGUMENT =
    3012     PACKAGE_MOP.addInternalSymbol("SHORT-METHOD-COMBINATION-IDENTITY-WITH-ONE-ARGUMENT");
    3013   public static final Symbol LONG_METHOD_COMBINATION_LAMBDA_LIST =
    3014     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-LAMBDA-LIST");
    3015   public static final Symbol LONG_METHOD_COMBINATION_METHOD_GROUP_SPECS =
    3016     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-METHOD-GROUP-SPECS");
    3017   public static final Symbol LONG_METHOD_COMBINATION_ARGS_LAMBDA_LIST =
    3018     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-ARGS-LAMBDA-LIST");
    3019   public static final Symbol LONG_METHOD_COMBINATION_GENERIC_FUNCTION_SYMBOL =
    3020     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-GENERIC-FUNCTION-SYMBOL");
    3021   public static final Symbol LONG_METHOD_COMBINATION_FUNCTION =
    3022     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-FUNCTION");
    3023   public static final Symbol LONG_METHOD_COMBINATION_ARGUMENTS =
    3024     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-ARGUMENTS");
    3025   public static final Symbol LONG_METHOD_COMBINATION_DECLARATIONS =
    3026     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-DECLARATIONS");
    3027   public static final Symbol LONG_METHOD_COMBINATION_FORMS =
    3028     PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-FORMS");
    3029   // slot names of (long-|short-)method-combination classes
    3030   public static final Symbol OPERATOR =
    3031     PACKAGE_MOP.addInternalSymbol("OPERATOR");
    3032   public static final Symbol IDENTITY_WITH_ONE_ARGUMENT =
    3033     PACKAGE_MOP.addInternalSymbol("IDENTITY-WITH-ONE-ARGUMENT");
    3034   public static final Symbol METHOD_GROUP_SPECS =
    3035     PACKAGE_MOP.addInternalSymbol("METHOD-GROUP-SPECS");
    3036   public static final Symbol ARGS_LAMBDA_LIST =
    3037     PACKAGE_MOP.addInternalSymbol("ARGS-LAMBDA-LIST");
    3038   public static final Symbol GENERIC_FUNCTION_SYMBOL =
    3039     PACKAGE_MOP.addInternalSymbol("GENERIC-FUNCTION-SYMBOL");
    3040   public static final Symbol ARGUMENTS =
    3041     PACKAGE_MOP.addInternalSymbol("ARGUMENTS");
    3042   public static final Symbol DECLARATIONS =
    3043     PACKAGE_MOP.addInternalSymbol("DECLARATIONS");
    3044   public static final Symbol FORMS =
    3045     PACKAGE_MOP.addInternalSymbol("FORMS");
    3046 
    30473005
    30483006  // Java interface.
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r14005 r14006  
    196196    (add-subclasses 'standard-object '(funcallable-standard-object metaobject))
    197197    (add-subclasses 'metaobject
    198                     '(generic-function method method-combination
    199                       slot-definition specializer))
     198                    '(generic-function method slot-definition specializer))
    200199    (add-subclasses 'specializer '(class))
    201     (add-subclasses 'method-combination
    202                     '(long-method-combination short-method-combination))
    203200    (add-subclasses 'funcallable-standard-object 'generic-function)
    204201    (add-subclasses 'generic-function 'standard-generic-function)
     
    910907  ((object :initform nil)
    911908   (direct-methods :initform nil)))
     909
     910(define-primordial-class method-combination (metaobject)
     911  ((sys::name :initform nil)
     912   (sys::%documentation :initarg :documentation :initform nil)
     913   (options :initarg :options :initform nil)))
     914
     915(define-primordial-class short-method-combination (method-combination)
     916  (operator
     917   identity-with-one-argument))
     918
     919(define-primordial-class long-method-combination (method-combination)
     920  (sys::lambda-list
     921   method-group-specs
     922   args-lambda-list
     923   generic-function-symbol
     924   function
     925   arguments
     926   declarations
     927   forms))
    912928
    913929(defvar *extensible-built-in-classes*
Note: See TracChangeset for help on using the changeset viewer.