[armedbear-cvs] r12465 - branches/metaclass/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Feb 13 22:59:06 UTC 2010


Author: ehuelsmann
Date: Sat Feb 13 17:59:05 2010
New Revision: 12465

Log:
Convert DIRECT-SUBCLASSES of STANDARD-CLASS to a slot.

Modified:
   branches/metaclass/abcl/src/org/armedbear/lisp/LispClass.java
   branches/metaclass/abcl/src/org/armedbear/lisp/StandardClass.java

Modified: branches/metaclass/abcl/src/org/armedbear/lisp/LispClass.java
==============================================================================
--- branches/metaclass/abcl/src/org/armedbear/lisp/LispClass.java	(original)
+++ branches/metaclass/abcl/src/org/armedbear/lisp/LispClass.java	Sat Feb 13 17:59:05 2010
@@ -135,7 +135,7 @@
                                   ? getClassLayout() : NIL));
     result = result.push(new Cons("DIRECT-SUPERCLASSES",
                                   getDirectSuperclasses()));
-    result = result.push(new Cons("DIRECT-SUBCLASSES", directSubclasses));
+    result = result.push(new Cons("DIRECT-SUBCLASSES", getDirectSubclasses()));
     result = result.push(new Cons("CLASS-PRECEDENCE-LIST", classPrecedenceList));
     result = result.push(new Cons("DIRECT-METHODS", directMethods));
     result = result.push(new Cons("DOCUMENTATION", documentation));
@@ -217,12 +217,12 @@
     setDirectSuperclasses(new Cons(superclass));
   }
 
-  public final LispObject getDirectSubclasses()
+  public LispObject getDirectSubclasses()
   {
     return directSubclasses;
   }
 
-  public final void setDirectSubclasses(LispObject directSubclasses)
+  public void setDirectSubclasses(LispObject directSubclasses)
   {
     this.directSubclasses = directSubclasses;
   }

Modified: branches/metaclass/abcl/src/org/armedbear/lisp/StandardClass.java
==============================================================================
--- branches/metaclass/abcl/src/org/armedbear/lisp/StandardClass.java	(original)
+++ branches/metaclass/abcl/src/org/armedbear/lisp/StandardClass.java	Sat Feb 13 17:59:05 2010
@@ -42,13 +42,16 @@
   private static Symbol symLayout = PACKAGE_MOP.intern("LAYOUT");
   private static Symbol symDirectSuperclasses
     = PACKAGE_MOP.intern("DIRECT-SUPERCLASSES");
+  private static Symbol symDirectSubclasses
+    = PACKAGE_MOP.intern("DIRECT-SUBCLASSES");
+
 
   static Layout layoutStandardClass =
       new Layout(null,
                  list(symName,
                       symLayout,
                       symDirectSuperclasses,
-                      PACKAGE_MOP.intern("DIRECT-SUBCLASSES"),
+                      symDirectSubclasses,
                       PACKAGE_MOP.intern("CLASS-PRECEDENCE-LIST"),
                       PACKAGE_MOP.intern("DIRECT-METHODS"),
                       PACKAGE_MOP.intern("DOCUMENTATION"),
@@ -68,12 +71,15 @@
   public StandardClass()
   {
       super(layoutStandardClass);
+      setDirectSuperclasses(NIL);
+      setDirectSubclasses(NIL);
   }
 
   public StandardClass(Symbol symbol, LispObject directSuperclasses)
   {
       super(layoutStandardClass,
             symbol, directSuperclasses);
+      setDirectSubclasses(NIL);
   }
 
   @Override
@@ -113,6 +119,18 @@
     setInstanceSlotValue(symDirectSuperclasses, directSuperclasses);
   }
 
+  @Override
+  public LispObject getDirectSubclasses()
+  {
+    return getInstanceSlotValue(symDirectSubclasses);
+  }
+
+  @Override
+  public void setDirectSubclasses(LispObject directSubclasses)
+  {
+    setInstanceSlotValue(symDirectSubclasses, directSubclasses);
+  }
+
 
 
   @Override




More information about the armedbear-cvs mailing list