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

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Mon Jan 30 20:24:27 UTC 2012


Author: ehuelsmann
Date: Mon Jan 30 12:24:27 2012
New Revision: 13835

Log:
Further cleanup of Closure.java.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Closure.java

Modified: trunk/abcl/src/org/armedbear/lisp/Closure.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Closure.java	Mon Jan 30 12:13:16 2012	(r13834)
+++ trunk/abcl/src/org/armedbear/lisp/Closure.java	Mon Jan 30 12:24:27 2012	(r13835)
@@ -50,14 +50,9 @@
   private final LispObject body;
   private final LispObject executionBody;
   private final Environment environment;
-  private int arity;
 
-  private int minArgs;
-  private int maxArgs;
-
-  private Symbol[] freeSpecials = new Symbol[0];
-
-  private ArgumentListProcessor arglist;
+  private final Symbol[] freeSpecials;
+  private final ArgumentListProcessor arglist;
 
     /** Construct a closure object with a lambda-list described
      * by these parameters.
@@ -74,14 +69,6 @@
                  Parameter[] optional,
                  Parameter[] keyword,
                  Symbol keys, Symbol rest, Symbol moreKeys) {
-      minArgs = required.length;
-      maxArgs = (rest == NIL && moreKeys == NIL)
-          ? minArgs + optional.length + 2*keyword.length : -1;
-
-      arity = (rest == NIL && moreKeys == NIL && keys == NIL
-               && optional.length == 0)
-          ? maxArgs : -1;
-
       // stuff we don't need: we're a compiled function
       body = null;
       executionBody = null;
@@ -109,6 +96,7 @@
                                           keyParams, keys != NIL,
                                           moreKeys != NIL,
                                           (rest == NIL) ? null : rest);
+      freeSpecials = new Symbol[0];
   }
 
 
@@ -136,8 +124,6 @@
 
     arglist = new ArgumentListProcessor(this, lambdaList, specials);
     freeSpecials = arglist.freeSpecials(specials);
-    minArgs = arglist.getMinArgs();
-    arity = arglist.getArity();
   }
 
   @Override




More information about the armedbear-cvs mailing list