Changeset 12598


Ignore:
Timestamp:
04/10/10 21:03:12 (11 years ago)
Author:
vvoutilainen
Message:

Make listp/endp/SYMBOLP final.

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

Legend:

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

    r12590 r12598  
    328328      return type_error(cdr, Symbol.LIST);
    329329    return this;
    330   }
    331 
    332   @Override
    333   public final boolean listp()
    334   {
    335     return true;
    336   }
    337 
    338   @Override
    339   public final boolean endp()
    340   {
    341     return false;
    342330  }
    343331
  • trunk/abcl/src/org/armedbear/lisp/LispObject.java

    r12590 r12598  
    594594  }
    595595
    596   public LispObject SYMBOLP()
    597   {
    598     return NIL;
    599   }
    600 
    601   public boolean listp()
    602   {
    603     return false;
     596  public final LispObject SYMBOLP()
     597  {
     598    return (this instanceof Symbol) ? T : NIL;
     599  }
     600
     601  public final boolean listp()
     602  {
     603    return (this instanceof Cons) || (this instanceof Nil);
    604604  }
    605605
     
    609609  }
    610610
    611   public boolean endp()
    612   {
     611  public final boolean endp()
     612  {
     613    if (this instanceof Cons)
     614        return false;
     615    else if (this instanceof Nil)
     616        return true;
    613617    type_error(this, Symbol.LIST);
    614618    // Not reached.
  • trunk/abcl/src/org/armedbear/lisp/Nil.java

    r12590 r12598  
    147147
    148148    @Override
    149     public boolean listp()
    150     {
    151         return true;
    152     }
    153 
    154     @Override
    155     public boolean endp()
    156     {
    157         return true;
    158     }
    159 
    160     @Override
    161149    public LispObject NOT()
    162150    {
  • trunk/abcl/src/org/armedbear/lisp/Symbol.java

    r12576 r12598  
    166166      return this == T ? T : NIL;
    167167    return super.typep(type);
    168   }
    169 
    170   @Override
    171   public final LispObject SYMBOLP()
    172   {
    173     return T;
    174168  }
    175169
Note: See TracChangeset for help on using the changeset viewer.