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

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


Author: rschlatte
Date: Fri Jul 13 09:44:19 2012
New Revision: 14007

Log:
Move definition of subclasses of standard-method metaclass to Lisp

- standard-accessor-method
- standard-reader-method
- standard-writer-method

- standard-method itself is used Java-side by StandardGenericFunction,
  so cannot be moved at this time.

Modified:
   trunk/abcl/src/org/armedbear/lisp/StandardClass.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 09:16:58 2012	(r14006)
+++ trunk/abcl/src/org/armedbear/lisp/StandardClass.java	Fri Jul 13 09:44:19 2012	(r14007)
@@ -616,15 +616,6 @@
   public static final StandardClass STANDARD_METHOD =
     addStandardClass(Symbol.STANDARD_METHOD, list(METHOD));
 
-  public static final StandardClass STANDARD_ACCESSOR_METHOD =
-    addStandardClass(Symbol.STANDARD_ACCESSOR_METHOD, list(STANDARD_METHOD));
-
-  public static final StandardClass STANDARD_READER_METHOD =
-      addStandardClass(Symbol.STANDARD_READER_METHOD, list(STANDARD_ACCESSOR_METHOD));
-
-  public static final StandardClass STANDARD_WRITER_METHOD =
-      addStandardClass(Symbol.STANDARD_WRITER_METHOD, list(STANDARD_ACCESSOR_METHOD));
-
   public static final StandardClass STANDARD_GENERIC_FUNCTION =
     new StandardGenericFunctionClass();
   static
@@ -738,20 +729,6 @@
            new SlotDefinition(Symbol.FAST_FUNCTION, NIL, constantlyNil),
            new SlotDefinition(Symbol._DOCUMENTATION, NIL, constantlyNil,
                               list(internKeyword("DOCUMENTATION")))));
-    STANDARD_ACCESSOR_METHOD.setCPL(STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
-                                    METHOD, METAOBJECT, STANDARD_OBJECT,
-                                    BuiltInClass.CLASS_T);
-    STANDARD_ACCESSOR_METHOD.setDirectSlotDefinitions(
-      list(new SlotDefinition(Symbol._SLOT_DEFINITION, NIL, constantlyNil,
-                              list(internKeyword("SLOT-DEFINITION")))));
-    STANDARD_READER_METHOD.setCPL(STANDARD_READER_METHOD,
-                                  STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
-                                  METHOD, METAOBJECT, STANDARD_OBJECT,
-                                  BuiltInClass.CLASS_T);
-    STANDARD_WRITER_METHOD.setCPL(STANDARD_WRITER_METHOD,
-                                  STANDARD_ACCESSOR_METHOD, STANDARD_METHOD,
-                                  METHOD, METAOBJECT, STANDARD_OBJECT,
-                                  BuiltInClass.CLASS_T);
     PACKAGE_ERROR.setCPL(PACKAGE_ERROR, ERROR, SERIOUS_CONDITION, CONDITION,
                          STANDARD_OBJECT, BuiltInClass.CLASS_T);
     PACKAGE_ERROR.setDirectSlotDefinitions(
@@ -851,9 +828,6 @@
     METAOBJECT.finalizeClass();
     METHOD.finalizeClass();
     STANDARD_METHOD.finalizeClass();
-    STANDARD_ACCESSOR_METHOD.finalizeClass();
-    STANDARD_READER_METHOD.finalizeClass();
-    STANDARD_WRITER_METHOD.finalizeClass();
     SPECIALIZER.finalizeClass();
     CLASS.finalizeClass();
     BUILT_IN_CLASS.finalizeClass();

Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Jul 13 09:16:58 2012	(r14006)
+++ trunk/abcl/src/org/armedbear/lisp/Symbol.java	Fri Jul 13 09:44:19 2012	(r14007)
@@ -3150,8 +3150,6 @@
     PACKAGE_SYS.addInternalSymbol("PROXY-PRELOADED-FUNCTION");
   public static final Symbol QUALIFIERS =
     PACKAGE_SYS.addInternalSymbol("QUALIFIERS");
-  public static final Symbol _SLOT_DEFINITION =
-    PACKAGE_SYS.addInternalSymbol("%SLOT-DEFINITION");
   public static final Symbol _SOURCE =
     PACKAGE_SYS.addInternalSymbol("%SOURCE");
   public static final Symbol SOCKET_STREAM =

Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/clos.lisp	Fri Jul 13 09:16:58 2012	(r14006)
+++ trunk/abcl/src/org/armedbear/lisp/clos.lisp	Fri Jul 13 09:44:19 2012	(r14007)
@@ -118,10 +118,6 @@
 (defconstant +the-standard-method-class+ (find-class 'standard-method))
 (defconstant +the-forward-referenced-class+
   (find-class 'forward-referenced-class))
-(defconstant +the-standard-reader-method-class+
-  (find-class 'standard-reader-method))
-(defconstant +the-standard-writer-method-class+
-  (find-class 'standard-writer-method))
 (defconstant +the-standard-generic-function-class+
   (find-class 'standard-generic-function))
 (defconstant +the-T-class+ (find-class 'T))
@@ -200,9 +196,6 @@
     (add-subclasses 'funcallable-standard-object 'generic-function)
     (add-subclasses 'generic-function 'standard-generic-function)
     (add-subclasses 'method 'standard-method)
-    (add-subclasses 'standard-method 'standard-accessor-method)
-    (add-subclasses 'standard-accessor-method
-                    '(standard-reader-method standard-writer-method))
     (add-subclasses 'slot-definition
                     '(direct-slot-definition effective-slot-definition
                       standard-slot-definition))
@@ -926,6 +919,20 @@
    declarations
    forms))
 
+(define-primordial-class standard-accessor-method (standard-method)
+  ((sys::%slot-definition :initarg :slot-definition :initform nil)))
+
+(define-primordial-class standard-reader-method (standard-accessor-method)
+  ())
+(defconstant +the-standard-reader-method-class+
+  (find-class 'standard-reader-method))
+
+(define-primordial-class standard-writer-method (standard-accessor-method)
+  ())
+(defconstant +the-standard-writer-method-class+
+  (find-class 'standard-writer-method))
+
+
 (defvar *extensible-built-in-classes*
   (list (find-class 'sequence)
         (find-class 'java:java-object)))




More information about the armedbear-cvs mailing list