Changeset 13823


Ignore:
Timestamp:
01/29/12 21:15:48 (9 years ago)
Author:
ehuelsmann
Message:

Add an ArgumentListProcessor? to Closure. It'll take over
argument list processing soon.

File:
1 edited

Legend:

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

    r13811 r13823  
    7777
    7878
     79  private ArgumentListProcessor arglist;
     80
    7981    /** Construct a closure object with a lambda-list described
    8082     * by these parameters.
     
    116118      executionBody = null;
    117119      environment = null;
     120
     121      ArrayList<ArgumentListProcessor.RequiredParam> reqParams =
     122              new ArrayList<ArgumentListProcessor.RequiredParam>();
     123      for (Parameter req : requiredParameters)
     124          reqParams.add(new ArgumentListProcessor.RequiredParam(req.var, false));
     125
     126      ArrayList<ArgumentListProcessor.OptionalParam> optParams =
     127              new ArrayList<ArgumentListProcessor.OptionalParam>();
     128      for (Parameter opt : optionalParameters)
     129          optParams.add(new ArgumentListProcessor.OptionalParam(opt.var, false,
     130                  (opt.svar == NIL) ? null : (Symbol)opt.svar, false,
     131                  opt.initForm));
     132
     133      ArrayList<ArgumentListProcessor.KeywordParam> keyParams =
     134              new ArrayList<ArgumentListProcessor.KeywordParam>();
     135      for (Parameter key : keywordParameters)
     136          keyParams.add(new ArgumentListProcessor.KeywordParam(key.var, false,
     137                  (key.svar == NIL) ? null : (Symbol)key.svar, false, key.initForm,
     138                  key.keyword));
     139      arglist = new ArgumentListProcessor(this, reqParams, optParams, keyParams, andKey, allowOtherKeys, restVar);
    118140  }
    119141
     
    352374      Debug.assertTrue(arity == minArgs);
    353375    variables = processVariables();
     376
     377    arglist = new ArgumentListProcessor(this, lambdaList, specials);
    354378  }
    355379
Note: See TracChangeset for help on using the changeset viewer.