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

Erik Huelsmann ehuelsmann at common-lisp.net
Thu Dec 25 11:46:10 UTC 2008


Author: ehuelsmann
Date: Thu Dec 25 11:46:10 2008
New Revision: 11478

Log:
Cleanup: remove dead code (including a redefinition of 'equals' which is the same as its super definition); add @Override annotations.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Function.java
   trunk/abcl/src/org/armedbear/lisp/Lisp.java
   trunk/abcl/src/org/armedbear/lisp/Operator.java
   trunk/abcl/src/org/armedbear/lisp/SocketStream.java
   trunk/abcl/src/org/armedbear/lisp/Symbol.java
   trunk/abcl/src/org/armedbear/lisp/socket_stream.java

Modified: trunk/abcl/src/org/armedbear/lisp/Function.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Function.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Function.java	Thu Dec 25 11:46:10 2008
@@ -136,16 +136,19 @@
         setLambdaList(lambdaList);
     }
 
+    @Override
     public LispObject typeOf()
     {
         return Symbol.FUNCTION;
     }
 
+    @Override
     public LispObject classOf()
     {
         return BuiltInClass.FUNCTION;
     }
 
+    @Override
     public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
     {
         if (typeSpecifier == Symbol.FUNCTION)
@@ -157,6 +160,7 @@
         return super.typep(typeSpecifier);
     }
 
+    @Override
     public final LispObject getPropertyList()
     {
         if (propertyList == null)
@@ -164,6 +168,7 @@
         return propertyList;
     }
 
+    @Override
     public final void setPropertyList(LispObject obj)
     {
         if (obj == null)
@@ -177,22 +182,26 @@
                             new JavaObject(bytes));
     }
 
+    @Override
     public LispObject execute() throws ConditionThrowable
     {
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject arg) throws ConditionThrowable
     {
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second)
         throws ConditionThrowable
     {
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second,
                               LispObject third)
         throws ConditionThrowable
@@ -200,6 +209,7 @@
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second,
                               LispObject third, LispObject fourth)
         throws ConditionThrowable
@@ -207,6 +217,7 @@
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second,
                               LispObject third, LispObject fourth,
                               LispObject fifth)
@@ -215,6 +226,7 @@
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second,
                               LispObject third, LispObject fourth,
                               LispObject fifth, LispObject sixth)
@@ -223,6 +235,7 @@
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second,
                               LispObject third, LispObject fourth,
                               LispObject fifth, LispObject sixth,
@@ -232,6 +245,7 @@
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second,
                               LispObject third, LispObject fourth,
                               LispObject fifth, LispObject sixth,
@@ -241,11 +255,13 @@
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public LispObject execute(LispObject[] args) throws ConditionThrowable
     {
         return error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     public String writeToString() throws ConditionThrowable
     {
         LispObject name = getLambdaName();
@@ -290,17 +306,20 @@
         error(new WrongNumberOfArgumentsException(this));
     }
 
+    @Override
     // Profiling.
     public final int getCallCount()
     {
         return callCount;
     }
 
+    @Override
     public void setCallCount(int n)
     {
         callCount = n;
     }
 
+    @Override
     public final void incrementCallCount()
     {
         ++callCount;

Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java	Thu Dec 25 11:46:10 2008
@@ -1933,6 +1933,7 @@
   public static final Primitive REMEMBER =
     new Primitive("remember", PACKAGE_SYS, true)
     {
+      @Override
       public LispObject execute(LispObject key, LispObject value)
         throws ConditionThrowable
       {
@@ -2479,6 +2480,7 @@
 
   public static final LispObject UNBOUND_VALUE = new LispObject()
     {
+      @Override
       public String writeToString()
       {
         return "#<UNBOUND>";
@@ -2487,6 +2489,7 @@
 
   public static final LispObject NULL_VALUE = new LispObject()
     {
+      @Override
       public String writeToString()
       {
         return "null";

Modified: trunk/abcl/src/org/armedbear/lisp/Operator.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Operator.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Operator.java	Thu Dec 25 11:46:10 2008
@@ -59,6 +59,7 @@
         lambdaList = obj;
     }
 
+    @Override
     public LispObject getParts() throws ConditionThrowable
     {
         LispObject result = NIL;

Modified: trunk/abcl/src/org/armedbear/lisp/SocketStream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SocketStream.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/SocketStream.java	Thu Dec 25 11:46:10 2008
@@ -45,16 +45,19 @@
         this.socket = socket;
     }
 
+    @Override
     public LispObject typeOf()
     {
         return Symbol.SOCKET_STREAM;
     }
 
+    @Override
     public LispObject classOf()
     {
         return BuiltInClass.SOCKET_STREAM;
     }
 
+    @Override
     public LispObject typep(LispObject type) throws ConditionThrowable
     {
         if (type == Symbol.SOCKET_STREAM)
@@ -64,6 +67,7 @@
         return super.typep(type);
     }
 
+    @Override
     public LispObject close(LispObject abort) throws ConditionThrowable
     {
 	try {
@@ -75,6 +79,7 @@
 	}
     }
 
+    @Override
     public String toString()
     {
         return unreadableString("SOCKET-STREAM");

Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Symbol.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Symbol.java	Thu Dec 25 11:46:10 2008
@@ -95,6 +95,7 @@
     this.pkg = pkg;
   }
 
+  @Override
   public LispObject typeOf()
   {
     if (pkg == PACKAGE_KEYWORD)
@@ -104,11 +105,13 @@
     return Symbol.SYMBOL;
   }
 
+  @Override
   public LispObject classOf()
   {
     return BuiltInClass.SYMBOL;
   }
 
+  @Override
   public LispObject getDescription() throws ConditionThrowable
   {
     final LispThread thread = LispThread.currentThread();
@@ -137,6 +140,7 @@
       }
   }
 
+  @Override
   public LispObject getParts() throws ConditionThrowable
   {
     LispObject parts = NIL;
@@ -150,6 +154,7 @@
     return parts.nreverse();
   }
 
+  @Override
   public LispObject typep(LispObject type) throws ConditionThrowable
   {
     if (type == Symbol.SYMBOL)
@@ -163,16 +168,19 @@
     return super.typep(type);
   }
 
+  @Override
   public final LispObject SYMBOLP()
   {
     return T;
   }
 
+  @Override
   public boolean constantp()
   {
     return (flags & FLAG_CONSTANT) != 0;
   }
 
+  @Override
   public final LispObject STRING()
   {
     return name;
@@ -188,11 +196,13 @@
     pkg = obj;
   }
 
+  @Override
   public final boolean isSpecialOperator()
   {
     return (function instanceof SpecialOperator);
   }
 
+  @Override
   public final boolean isSpecialVariable()
   {
     return (flags & FLAG_SPECIAL) != 0;
@@ -274,6 +284,7 @@
   }
 
   // Raw accessor.
+  @Override
   public LispObject getSymbolValue()
   {
     return value;
@@ -326,11 +337,13 @@
     return value;
   }
 
+  @Override
   public LispObject getSymbolFunction()
   {
     return function;
   }
 
+  @Override
   public final LispObject getSymbolFunctionOrDie() throws ConditionThrowable
   {
     if (function == null)
@@ -359,6 +372,7 @@
     this.function = obj;
   }
 
+  @Override
   public final LispObject getPropertyList()
   {
     if (propertyList == null)
@@ -366,6 +380,7 @@
     return propertyList;
   }
 
+  @Override
   public final void setPropertyList(LispObject obj)
   {
     if (obj == null)
@@ -373,6 +388,7 @@
     propertyList = obj;
   }
 
+  @Override
   public String writeToString() throws ConditionThrowable
   {
     final String n = name.getStringValue();
@@ -685,6 +701,7 @@
     return sb.toString();
   }
 
+  @Override
   public final int sxhash()
   {
     int h = hash;
@@ -696,11 +713,7 @@
     return h;
   }
 
-  public final boolean equals(Object obj)
-  {
-    return this == obj;
-  }
-
+  @Override
   public LispObject execute() throws ConditionThrowable
   {
     try
@@ -713,6 +726,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject arg) throws ConditionThrowable
   {
     try
@@ -725,6 +739,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second)
     throws ConditionThrowable
   {
@@ -738,6 +753,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second,
                             LispObject third)
     throws ConditionThrowable
@@ -752,6 +768,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second,
                             LispObject third, LispObject fourth)
     throws ConditionThrowable
@@ -766,6 +783,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second,
                             LispObject third, LispObject fourth,
                             LispObject fifth)
@@ -781,6 +799,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second,
                             LispObject third, LispObject fourth,
                             LispObject fifth, LispObject sixth)
@@ -797,6 +816,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second,
                             LispObject third, LispObject fourth,
                             LispObject fifth, LispObject sixth,
@@ -816,6 +836,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject first, LispObject second,
                             LispObject third, LispObject fourth,
                             LispObject fifth, LispObject sixth,
@@ -835,6 +856,7 @@
       }
   }
 
+  @Override
   public LispObject execute(LispObject[] args) throws ConditionThrowable
   {
     try
@@ -850,15 +872,6 @@
       }
   }
 
-  private final LispObject signalNPE(NullPointerException e)
-    throws ConditionThrowable
-  {
-    if (function == null)
-      return error(new UndefinedFunction(this));
-    Debug.trace(e);
-    return error(new LispError("Null pointer exception"));
-  }
-
   private final LispObject handleNPE(NullPointerException e, LispObject args)
     throws ConditionThrowable
   {
@@ -869,6 +882,7 @@
     return error(new LispError("Null pointer exception"));
   }
 
+  @Override
   public void incrementCallCount()
   {
     if (function != null)

Modified: trunk/abcl/src/org/armedbear/lisp/socket_stream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/socket_stream.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/socket_stream.java	Thu Dec 25 11:46:10 2008
@@ -43,6 +43,7 @@
         super("%socket-stream", PACKAGE_SYS, false, "socket element-type external-format");
     }
 
+    @Override
     public LispObject execute(LispObject first, LispObject second, LispObject third)
         throws ConditionThrowable
     {




More information about the armedbear-cvs mailing list