Changeset 13835


Ignore:
Timestamp:
01/30/12 20:24:27 (9 years ago)
Author:
ehuelsmann
Message:

Further cleanup of Closure.java.

File:
1 edited

Legend:

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

    r13834 r13835  
    5151  private final LispObject executionBody;
    5252  private final Environment environment;
    53   private int arity;
    54 
    55   private int minArgs;
    56   private int maxArgs;
    57 
    58   private Symbol[] freeSpecials = new Symbol[0];
    59 
    60   private ArgumentListProcessor arglist;
     53
     54  private final Symbol[] freeSpecials;
     55  private final ArgumentListProcessor arglist;
    6156
    6257    /** Construct a closure object with a lambda-list described
     
    7570                 Parameter[] keyword,
    7671                 Symbol keys, Symbol rest, Symbol moreKeys) {
    77       minArgs = required.length;
    78       maxArgs = (rest == NIL && moreKeys == NIL)
    79           ? minArgs + optional.length + 2*keyword.length : -1;
    80 
    81       arity = (rest == NIL && moreKeys == NIL && keys == NIL
    82                && optional.length == 0)
    83           ? maxArgs : -1;
    84 
    8572      // stuff we don't need: we're a compiled function
    8673      body = null;
     
    11097                                          moreKeys != NIL,
    11198                                          (rest == NIL) ? null : rest);
     99      freeSpecials = new Symbol[0];
    112100  }
    113101
     
    137125    arglist = new ArgumentListProcessor(this, lambdaList, specials);
    138126    freeSpecials = arglist.freeSpecials(specials);
    139     minArgs = arglist.getMinArgs();
    140     arity = arglist.getArity();
    141127  }
    142128
Note: See TracChangeset for help on using the changeset viewer.