Changeset 12588


Ignore:
Timestamp:
04/10/10 17:17:08 (11 years ago)
Author:
vvoutilainen
Message:

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

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/AbstractBitVector.java

    r12288 r12588  
    192192    }
    193193
    194     // Ignores fill pointer.
    195     @Override
    196     public LispObject AREF(LispObject index)
    197     {
    198         return AREF(Fixnum.getValue(index));
    199     }
    200 
    201194    @Override
    202195    public LispObject reverse()
  • trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte16.java

    r12288 r12588  
    152152        catch (ArrayIndexOutOfBoundsException e) {
    153153            badIndex(index, elements.length);
    154             return NIL; // Not reached.
    155         }
    156     }
    157 
    158     // Ignores fill pointer.
    159     @Override
    160     public LispObject AREF(LispObject index)
    161     {
    162         try {
    163             return Fixnum.getInstance(elements[Fixnum.getValue(index)]);
    164         }
    165         catch (ArrayIndexOutOfBoundsException e) {
    166             badIndex(Fixnum.getValue(index), elements.length);
    167154            return NIL; // Not reached.
    168155        }
  • trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte32.java

    r12288 r12588  
    170170      {
    171171        badIndex(index, elements.length);
    172         return NIL; // Not reached.
    173       }
    174   }
    175 
    176   @Override
    177   public LispObject AREF(LispObject index)
    178   {
    179         final int idx = Fixnum.getValue(index);
    180     try
    181       {
    182         return number(elements[idx]);
    183       }
    184     catch (ArrayIndexOutOfBoundsException e)
    185       {
    186         badIndex(idx, elements.length);
    187172        return NIL; // Not reached.
    188173      }
  • trunk/abcl/src/org/armedbear/lisp/BasicVector_UnsignedByte8.java

    r12414 r12588  
    162162      {
    163163        badIndex(index, elements.length);
    164         return NIL; // Not reached.
    165       }
    166   }
    167 
    168   @Override
    169   public LispObject AREF(LispObject index)
    170   {
    171           int idx = Fixnum.getValue(index);
    172     try
    173       {
    174         return coerceJavaByteToLispObject(elements[idx]);
    175       }
    176     catch (ArrayIndexOutOfBoundsException e)
    177       {
    178         badIndex(idx, elements.length);
    179164        return NIL; // Not reached.
    180165      }
  • trunk/abcl/src/org/armedbear/lisp/ComplexString.java

    r12288 r12588  
    412412  }
    413413
    414   // Ignores fill pointer.
    415   @Override
    416   public LispObject AREF(LispObject index)
    417   {
    418     return LispCharacter.getInstance(charAt(Fixnum.getValue(index)));
    419   }
    420 
    421414  @Override
    422415  public void aset(int index, LispObject newValue)
  • trunk/abcl/src/org/armedbear/lisp/ComplexVector.java

    r12288 r12588  
    194194    }
    195195
    196     // Ignores fill pointer.
    197     // FIXME inline
    198     @Override
    199     public LispObject AREF(LispObject index)
    200     {
    201         return AREF(Fixnum.getValue(index));
    202     }
    203 
    204196    @Override
    205197    public void aset(int index, LispObject newValue)
  • trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte32.java

    r12288 r12588  
    195195    }
    196196
    197     // Ignores fill pointer.
    198     // FIXME inline
    199     @Override
    200     public LispObject AREF(LispObject index)
    201     {
    202         return AREF(Fixnum.getValue(index));
    203     }
    204 
    205197    @Override
    206198    public void aset(int index, LispObject newValue)
  • trunk/abcl/src/org/armedbear/lisp/ComplexVector_UnsignedByte8.java

    r12288 r12588  
    193193    }
    194194
    195     // Ignores fill pointer.
    196     // FIXME inline
    197     @Override
    198     public LispObject AREF(LispObject index)
    199     {
    200         return AREF(Fixnum.getValue(index));
    201     }
    202 
    203195    @Override
    204196    public void aset(int index, int n)
  • trunk/abcl/src/org/armedbear/lisp/LispObject.java

    r12576 r12588  
    506506  }
    507507
    508   public LispObject AREF(LispObject index)
     508  public final LispObject AREF(LispObject index)
    509509  {
    510510      return AREF(Fixnum.getValue(index));
     
    523523  }
    524524
    525   public void aset(LispObject index, LispObject newValue)
     525  public final void aset(LispObject index, LispObject newValue)
    526526
    527527  {
  • trunk/abcl/src/org/armedbear/lisp/SimpleString.java

    r12494 r12588  
    402402    }
    403403
    404     @Override
    405     public LispObject AREF(LispObject index)
    406     {
    407         try {
    408             return LispCharacter.getInstance(chars[Fixnum.getValue(index)]);
    409         }
    410         catch (ArrayIndexOutOfBoundsException e) {
    411             badIndex(((Fixnum)index).value, capacity);
    412             return NIL; // Not reached.
    413         }
    414     }
    415404
    416405    @Override
  • trunk/abcl/src/org/armedbear/lisp/SimpleVector.java

    r12513 r12588  
    176176
    177177  @Override
    178   public LispObject AREF(LispObject index)
    179   {
    180         int idx = Fixnum.getValue(index);
    181     try
    182       {
    183         return data[idx];
    184       }
    185     catch (ArrayIndexOutOfBoundsException e)
    186       {
    187         badIndex(idx, data.length);
    188         return NIL; // Not reached.
    189       }
    190   }
    191 
    192   @Override
    193178  public void aset(int index, LispObject newValue)
    194179  {
Note: See TracChangeset for help on using the changeset viewer.