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

Ville Voutilainen vvoutilainen at common-lisp.net
Sat Apr 10 17:17:09 UTC 2010


Author: vvoutilainen
Date: Sat Apr 10 13:17:08 2010
New Revision: 12588

Log:
Make AREF(LispObject) and aset(LispObject, LispObject) final.


Modified:
   trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java
   trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte16.java
   trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte32.java
   trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java
   trunk/abcl/src/org/armedbear/lisp/ComplexString.java
   trunk/abcl/src/org/armedbear/lisp/ComplexVector.java
   trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte32.java
   trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte8.java
   trunk/abcl/src/org/armedbear/lisp/LispObject.java
   trunk/abcl/src/org/armedbear/lisp/SimpleString.java
   trunk/abcl/src/org/armedbear/lisp/SimpleVector.java

Modified: trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java	Sat Apr 10 13:17:08 2010
@@ -191,13 +191,6 @@
         }
     }
 
-    // Ignores fill pointer.
-    @Override
-    public LispObject AREF(LispObject index)
-    {
-        return AREF(Fixnum.getValue(index));
-    }
-
     @Override
     public LispObject reverse()
     {

Modified: trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte16.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte16.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte16.java	Sat Apr 10 13:17:08 2010
@@ -155,19 +155,6 @@
         }
     }
 
-    // Ignores fill pointer.
-    @Override
-    public LispObject AREF(LispObject index)
-    {
-        try {
-            return Fixnum.getInstance(elements[Fixnum.getValue(index)]);
-        }
-        catch (ArrayIndexOutOfBoundsException e) {
-            badIndex(Fixnum.getValue(index), elements.length);
-            return NIL; // Not reached.
-        }
-    }
-
     @Override
     public void aset(int index, int n)
     {

Modified: trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte32.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte32.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte32.java	Sat Apr 10 13:17:08 2010
@@ -174,21 +174,6 @@
   }
 
   @Override
-  public LispObject AREF(LispObject index)
-  {
-        final int idx = Fixnum.getValue(index);
-    try
-      {
-        return number(elements[idx]);
-      }
-    catch (ArrayIndexOutOfBoundsException e)
-      {
-        badIndex(idx, elements.length);
-        return NIL; // Not reached.
-      }
-  }
-
-  @Override
   public void aset(int index, LispObject newValue)
   {
     try

Modified: trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java	Sat Apr 10 13:17:08 2010
@@ -166,21 +166,6 @@
   }
 
   @Override
-  public LispObject AREF(LispObject index)
-  {
-          int idx = Fixnum.getValue(index);
-    try
-      {
-        return coerceJavaByteToLispObject(elements[idx]);
-      }
-    catch (ArrayIndexOutOfBoundsException e)
-      {
-        badIndex(idx, elements.length);
-        return NIL; // Not reached.
-      }
-  }
-
-  @Override
   public void aset(int index, int n)
   {
     try

Modified: trunk/abcl/src/org/armedbear/lisp/ComplexString.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ComplexString.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ComplexString.java	Sat Apr 10 13:17:08 2010
@@ -411,13 +411,6 @@
     return LispCharacter.getInstance(charAt(index));
   }
 
-  // Ignores fill pointer.
-  @Override
-  public LispObject AREF(LispObject index)
-  {
-    return LispCharacter.getInstance(charAt(Fixnum.getValue(index)));
-  }
-
   @Override
   public void aset(int index, LispObject newValue)
   {

Modified: trunk/abcl/src/org/armedbear/lisp/ComplexVector.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ComplexVector.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ComplexVector.java	Sat Apr 10 13:17:08 2010
@@ -193,14 +193,6 @@
         }
     }
 
-    // Ignores fill pointer.
-    // FIXME inline
-    @Override
-    public LispObject AREF(LispObject index)
-    {
-        return AREF(Fixnum.getValue(index));
-    }
-
     @Override
     public void aset(int index, LispObject newValue)
     {

Modified: trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte32.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte32.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte32.java	Sat Apr 10 13:17:08 2010
@@ -194,14 +194,6 @@
         }
     }
 
-    // Ignores fill pointer.
-    // FIXME inline
-    @Override
-    public LispObject AREF(LispObject index)
-    {
-        return AREF(Fixnum.getValue(index));
-    }
-
     @Override
     public void aset(int index, LispObject newValue)
     {

Modified: trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte8.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte8.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte8.java	Sat Apr 10 13:17:08 2010
@@ -192,14 +192,6 @@
         }
     }
 
-    // Ignores fill pointer.
-    // FIXME inline
-    @Override
-    public LispObject AREF(LispObject index)
-    {
-        return AREF(Fixnum.getValue(index));
-    }
-
     @Override
     public void aset(int index, int n)
     {

Modified: trunk/abcl/src/org/armedbear/lisp/LispObject.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispObject.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/LispObject.java	Sat Apr 10 13:17:08 2010
@@ -505,7 +505,7 @@
     return type_error(this, Symbol.ARRAY);
   }
 
-  public LispObject AREF(LispObject index)
+  public final LispObject AREF(LispObject index)
   {
       return AREF(Fixnum.getValue(index));
   }
@@ -522,7 +522,7 @@
     type_error(this, Symbol.ARRAY);
   }
 
-  public void aset(LispObject index, LispObject newValue)
+  public final void aset(LispObject index, LispObject newValue)
 
   {
       aset(Fixnum.getValue(index), newValue);

Modified: trunk/abcl/src/org/armedbear/lisp/SimpleString.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SimpleString.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/SimpleString.java	Sat Apr 10 13:17:08 2010
@@ -401,17 +401,6 @@
         }
     }
 
-    @Override
-    public LispObject AREF(LispObject index)
-    {
-        try {
-            return LispCharacter.getInstance(chars[Fixnum.getValue(index)]);
-        }
-        catch (ArrayIndexOutOfBoundsException e) {
-            badIndex(((Fixnum)index).value, capacity);
-            return NIL; // Not reached.
-        }
-    }
 
     @Override
     public void aset(int index, LispObject obj)

Modified: trunk/abcl/src/org/armedbear/lisp/SimpleVector.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/SimpleVector.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/SimpleVector.java	Sat Apr 10 13:17:08 2010
@@ -175,21 +175,6 @@
   }
 
   @Override
-  public LispObject AREF(LispObject index)
-  {
-        int idx = Fixnum.getValue(index);
-    try
-      {
-        return data[idx];
-      }
-    catch (ArrayIndexOutOfBoundsException e)
-      {
-        badIndex(idx, data.length);
-        return NIL; // Not reached.
-      }
-  }
-
-  @Override
   public void aset(int index, LispObject newValue)
   {
     try




More information about the armedbear-cvs mailing list