[armedbear-cvs] r14006 - trunk/abcl/src/org/armedbear/lisp

rschlatte at common-lisp.net rschlatte at common-lisp.net
Fri Jul 13 16:16:59 UTC 2012


Author: rschlatte
Date: Fri Jul 13 09:16:58 2012
New Revision: 14006

Log:
Move method-combination metaclass definitions into Lisp

- method-combination
- long-method-combination
- short-method-combination

Modified:
   trunk/abcl/src/org/armedbear/lisp/StandardClass.java
   trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java
   trunk/abcl/src/org/armedbear/lisp/Symbol.java
   trunk/abcl/src/org/armedbear/lisp/clos.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/StandardClass.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StandardClass.java	Fri Jul 13 07:15:58 2012	(r14005)
+++ trunk/abcl/src/org/armedbear/lisp/StandardClass.java	Fri Jul 13 09:16:58 2012	(r14006)
@@ -491,15 +491,6 @@
     addClass(Symbol.GENERIC_FUNCTION, GENERIC_FUNCTION);
   }
 
-  public static final StandardClass METHOD_COMBINATION =
-    addStandardClass(Symbol.METHOD_COMBINATION, list(METAOBJECT));
-
-  public static final StandardClass SHORT_METHOD_COMBINATION =
-    addStandardClass(Symbol.SHORT_METHOD_COMBINATION, list(METHOD_COMBINATION));
-
-  public static final StandardClass LONG_METHOD_COMBINATION =
-    addStandardClass(Symbol.LONG_METHOD_COMBINATION, list(METHOD_COMBINATION));
-
   public static final StandardClass CLASS =
     addStandardClass(Symbol.CLASS, list(SPECIALIZER));
 
@@ -761,47 +752,6 @@
                                   STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
                                   METHOD, METAOBJECT, STANDARD_OBJECT,
                                   BuiltInClass.CLASS_T);
-    METHOD_COMBINATION.setCPL(METHOD_COMBINATION, METAOBJECT, STANDARD_OBJECT,
-                              BuiltInClass.CLASS_T);
-    METHOD_COMBINATION.setDirectSlotDefinitions(
-      list(new SlotDefinition(Symbol.NAME,
-                              list(Symbol.METHOD_COMBINATION_NAME),
-                              constantlyNil),
-           new SlotDefinition(Symbol._DOCUMENTATION,
-                              list(Symbol.METHOD_COMBINATION_DOCUMENTATION),
-                              constantlyNil, list(internKeyword("DOCUMENTATION"))),
-           new SlotDefinition(PACKAGE_MOP.intern("OPTIONS"),
-                              NIL, constantlyNil,
-                              list(internKeyword("OPTIONS")))));
-    SHORT_METHOD_COMBINATION.setCPL(SHORT_METHOD_COMBINATION,
-                                    METHOD_COMBINATION, METAOBJECT,
-                                    STANDARD_OBJECT, BuiltInClass.CLASS_T);
-    SHORT_METHOD_COMBINATION.setDirectSlotDefinitions(
-      list(new SlotDefinition(Symbol.OPERATOR,
-                              list(Symbol.SHORT_METHOD_COMBINATION_OPERATOR)),
-           new SlotDefinition(Symbol.IDENTITY_WITH_ONE_ARGUMENT,
-                              list(Symbol.SHORT_METHOD_COMBINATION_IDENTITY_WITH_ONE_ARGUMENT))));
-    LONG_METHOD_COMBINATION.setCPL(LONG_METHOD_COMBINATION,
-                                   METHOD_COMBINATION, METAOBJECT,
-                                   STANDARD_OBJECT, BuiltInClass.CLASS_T);
-    LONG_METHOD_COMBINATION.setDirectSlotDefinitions(
-      list(new SlotDefinition(Symbol.LAMBDA_LIST,
-                              list(Symbol.LONG_METHOD_COMBINATION_LAMBDA_LIST)),
-           new SlotDefinition(Symbol.METHOD_GROUP_SPECS,
-                              list(Symbol.LONG_METHOD_COMBINATION_METHOD_GROUP_SPECS)),
-           new SlotDefinition(Symbol.ARGS_LAMBDA_LIST,
-                              list(Symbol.LONG_METHOD_COMBINATION_ARGS_LAMBDA_LIST)),
-           new SlotDefinition(Symbol.GENERIC_FUNCTION_SYMBOL,
-                              list(Symbol.LONG_METHOD_COMBINATION_GENERIC_FUNCTION_SYMBOL)),
-           new SlotDefinition(Symbol.FUNCTION,
-                              list(Symbol.LONG_METHOD_COMBINATION_FUNCTION)),
-           new SlotDefinition(Symbol.ARGUMENTS,
-                              list(Symbol.LONG_METHOD_COMBINATION_ARGUMENTS)),
-           new SlotDefinition(Symbol.DECLARATIONS,
-                              list(Symbol.LONG_METHOD_COMBINATION_DECLARATIONS)),
-           new SlotDefinition(Symbol.FORMS,
-                              list(Symbol.LONG_METHOD_COMBINATION_FORMS))));
-
     PACKAGE_ERROR.setCPL(PACKAGE_ERROR, ERROR, SERIOUS_CONDITION, CONDITION,
                          STANDARD_OBJECT, BuiltInClass.CLASS_T);
     PACKAGE_ERROR.setDirectSlotDefinitions(
@@ -907,9 +857,6 @@
     SPECIALIZER.finalizeClass();
     CLASS.finalizeClass();
     BUILT_IN_CLASS.finalizeClass();
-    METHOD_COMBINATION.finalizeClass();
-    SHORT_METHOD_COMBINATION.finalizeClass();
-    LONG_METHOD_COMBINATION.finalizeClass();
     PACKAGE_ERROR.finalizeClass();
     PARSE_ERROR.finalizeClass();
     PRINT_NOT_READABLE.finalizeClass();

Modified: trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java	Fri Jul 13 07:15:58 2012	(r14005)
+++ trunk/abcl/src/org/armedbear/lisp/StandardGenericFunctionClass.java	Fri Jul 13 09:16:58 2012	(r14006)
@@ -66,7 +66,7 @@
         pkg.intern("METHOD-CLASS"),
         pkg.intern("%METHOD-COMBINATION"),
         pkg.intern("ARGUMENT-PRECEDENCE-ORDER"),
-        Symbol.DECLARATIONS,
+        pkg.intern("DECLARATIONS"),
         pkg.intern("CLASSES-TO-EMF-TABLE"),
         Symbol._DOCUMENTATION
       };

Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Jul 13 07:15:58 2012	(r14005)
+++ trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Jul 13 09:16:58 2012	(r14006)
@@ -2977,10 +2977,6 @@
     PACKAGE_MOP.addExternalSymbol("FUNCALLABLE-STANDARD-CLASS");
   public static final Symbol GENERIC_FUNCTION_METHODS =
     PACKAGE_MOP.addExternalSymbol("GENERIC-FUNCTION-METHODS");
-  public static final Symbol SHORT_METHOD_COMBINATION =
-    PACKAGE_MOP.addInternalSymbol("SHORT-METHOD-COMBINATION");
-  public static final Symbol LONG_METHOD_COMBINATION =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION");
   public static final Symbol METAOBJECT =
     PACKAGE_MOP.addExternalSymbol("METAOBJECT");
   public static final Symbol SPECIALIZER =
@@ -3006,44 +3002,6 @@
     PACKAGE_MOP.addInternalSymbol("METHOD-COMBINATION-NAME");
   public static final Symbol METHOD_COMBINATION_DOCUMENTATION =
     PACKAGE_MOP.addInternalSymbol("METHOD-COMBINATION-DOCUMENTATION");
-  public static final Symbol SHORT_METHOD_COMBINATION_OPERATOR =
-    PACKAGE_MOP.addInternalSymbol("SHORT-METHOD-COMBINATION-OPERATOR");
-  public static final Symbol SHORT_METHOD_COMBINATION_IDENTITY_WITH_ONE_ARGUMENT =
-    PACKAGE_MOP.addInternalSymbol("SHORT-METHOD-COMBINATION-IDENTITY-WITH-ONE-ARGUMENT");
-  public static final Symbol LONG_METHOD_COMBINATION_LAMBDA_LIST =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-LAMBDA-LIST");
-  public static final Symbol LONG_METHOD_COMBINATION_METHOD_GROUP_SPECS =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-METHOD-GROUP-SPECS");
-  public static final Symbol LONG_METHOD_COMBINATION_ARGS_LAMBDA_LIST =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-ARGS-LAMBDA-LIST");
-  public static final Symbol LONG_METHOD_COMBINATION_GENERIC_FUNCTION_SYMBOL =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-GENERIC-FUNCTION-SYMBOL");
-  public static final Symbol LONG_METHOD_COMBINATION_FUNCTION =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-FUNCTION");
-  public static final Symbol LONG_METHOD_COMBINATION_ARGUMENTS =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-ARGUMENTS");
-  public static final Symbol LONG_METHOD_COMBINATION_DECLARATIONS =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-DECLARATIONS");
-  public static final Symbol LONG_METHOD_COMBINATION_FORMS =
-    PACKAGE_MOP.addInternalSymbol("LONG-METHOD-COMBINATION-FORMS");
-  // slot names of (long-|short-)method-combination classes
-  public static final Symbol OPERATOR =
-    PACKAGE_MOP.addInternalSymbol("OPERATOR");
-  public static final Symbol IDENTITY_WITH_ONE_ARGUMENT =
-    PACKAGE_MOP.addInternalSymbol("IDENTITY-WITH-ONE-ARGUMENT");
-  public static final Symbol METHOD_GROUP_SPECS =
-    PACKAGE_MOP.addInternalSymbol("METHOD-GROUP-SPECS");
-  public static final Symbol ARGS_LAMBDA_LIST =
-    PACKAGE_MOP.addInternalSymbol("ARGS-LAMBDA-LIST");
-  public static final Symbol GENERIC_FUNCTION_SYMBOL =
-    PACKAGE_MOP.addInternalSymbol("GENERIC-FUNCTION-SYMBOL");
-  public static final Symbol ARGUMENTS =
-    PACKAGE_MOP.addInternalSymbol("ARGUMENTS");
-  public static final Symbol DECLARATIONS =
-    PACKAGE_MOP.addInternalSymbol("DECLARATIONS");
-  public static final Symbol FORMS =
-    PACKAGE_MOP.addInternalSymbol("FORMS");
-
 
   // Java interface.
   public static final Symbol JAVA_EXCEPTION =

Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/clos.lisp	Fri Jul 13 07:15:58 2012	(r14005)
+++ trunk/abcl/src/org/armedbear/lisp/clos.lisp	Fri Jul 13 09:16:58 2012	(r14006)
@@ -195,11 +195,8 @@
     (add-subclasses 'function 'funcallable-standard-object)
     (add-subclasses 'standard-object '(funcallable-standard-object metaobject))
     (add-subclasses 'metaobject
-                    '(generic-function method method-combination
-                      slot-definition specializer))
+                    '(generic-function method slot-definition specializer))
     (add-subclasses 'specializer '(class))
-    (add-subclasses 'method-combination
-                    '(long-method-combination short-method-combination))
     (add-subclasses 'funcallable-standard-object 'generic-function)
     (add-subclasses 'generic-function 'standard-generic-function)
     (add-subclasses 'method 'standard-method)
@@ -910,6 +907,25 @@
   ((object :initform nil)
    (direct-methods :initform nil)))
 
+(define-primordial-class method-combination (metaobject)
+  ((sys::name :initform nil)
+   (sys::%documentation :initarg :documentation :initform nil)
+   (options :initarg :options :initform nil)))
+
+(define-primordial-class short-method-combination (method-combination)
+  (operator
+   identity-with-one-argument))
+
+(define-primordial-class long-method-combination (method-combination)
+  (sys::lambda-list
+   method-group-specs
+   args-lambda-list
+   generic-function-symbol
+   function
+   arguments
+   declarations
+   forms))
+
 (defvar *extensible-built-in-classes*
   (list (find-class 'sequence)
         (find-class 'java:java-object)))




More information about the armedbear-cvs mailing list