org.armedbear.lisp
Class Closure

java.lang.Object
  extended by org.armedbear.lisp.LispObject
      extended by org.armedbear.lisp.Operator
          extended by org.armedbear.lisp.Function
              extended by org.armedbear.lisp.Closure
Direct Known Subclasses:
CompiledClosure

public class Closure
extends Function


Nested Class Summary
static class Closure.Parameter
           
 
Nested classes/interfaces inherited from class org.armedbear.lisp.Function
Function.pf_function_class_bytes
 
Field Summary
static int AUX
           
static int KEYWORD
           
static int OPTIONAL
           
static int REQUIRED
           
static int REST
           
 
Fields inherited from class org.armedbear.lisp.Function
FUNCTION_CLASS_BYTES
 
Fields inherited from class org.armedbear.lisp.Operator
lambdaName
 
Constructor Summary
Closure(Closure.Parameter[] required, Closure.Parameter[] optional, Closure.Parameter[] keyword, Symbol keys, Symbol rest, Symbol moreKeys)
          Construct a closure object with a lambda-list described by these parameters.
Closure(LispObject lambdaExpression, Environment env)
           
Closure(LispObject name, LispObject lambdaExpression, Environment env)
           
 
Method Summary
 LispObject execute()
           
 LispObject execute(LispObject arg)
           
 LispObject execute(LispObject[] args)
           
 LispObject execute(LispObject first, LispObject second)
           
 LispObject execute(LispObject first, LispObject second, LispObject third)
           
 LispObject execute(LispObject first, LispObject second, LispObject third, LispObject fourth)
           
 LispObject execute(LispObject first, LispObject second, LispObject third, LispObject fourth, LispObject fifth)
           
 LispObject execute(LispObject first, LispObject second, LispObject third, LispObject fourth, LispObject fifth, LispObject sixth)
           
 LispObject execute(LispObject first, LispObject second, LispObject third, LispObject fourth, LispObject fifth, LispObject sixth, LispObject seventh)
           
 LispObject execute(LispObject first, LispObject second, LispObject third, LispObject fourth, LispObject fifth, LispObject sixth, LispObject seventh, LispObject eighth)
           
protected  LispObject[] fastProcessArgs(LispObject[] args)
           
 LispObject getBody()
           
 Environment getEnvironment()
           
 LispObject getVariableList()
           
 LispObject invokeArrayExecute(LispObject... objects)
           
protected  LispObject[] processArgs(LispObject[] args, LispThread thread)
           
 LispObject typep(LispObject typeSpecifier)
           
 
Methods inherited from class org.armedbear.lisp.Function
argCountError, classOf, getCallCount, getClassBytes, getHotCount, getPropertyList, incrementCallCount, incrementHotCount, setCallCount, setClassBytes, setHotCount, setPropertyList, typeOf, writeToString
 
Methods inherited from class org.armedbear.lisp.Operator
getLambdaList, getLambdaName, getParts, setLambdaList, setLambdaName
 
Methods inherited from class org.armedbear.lisp.LispObject
ABS, add, add, aref_long, aref, AREF, AREF, aset, aset, aset, ash, ash, atom, ATOM, caddr, cadr, car, cddr, cdr, CHAR, characterp, CHARACTERP, chars, COMPLEXP, constantp, CONSTANTP, copyToArray, decr, DENOMINATOR, dispatch, divideBy, doubleValue, elt, endp, ENDP, EQ, eql, eql, eql, EQL, equal, equal, EQUAL, equalp, equalp, evenp, EVENP, execute, floatp, FLOATP, floatValue, getBooleanValue, getDescription, getDocumentation, getFixnumSlotValue, getInstance, getSlotValue_0, getSlotValue_1, getSlotValue_2, getSlotValue_3, getSlotValue, getSlotValueAsBoolean, getStringChars, getStringValue, getSymbolFunction, getSymbolFunctionOrDie, getSymbolSetfFunction, getSymbolSetfFunctionOrDie, getSymbolValue, incr, integerp, INTEGERP, intValue, IS_E, IS_GE, IS_GT, IS_LE, IS_LT, IS_NE, isEqualTo, isEqualTo, isGreaterThan, isGreaterThan, isGreaterThanOrEqualTo, isGreaterThanOrEqualTo, isLessThan, isLessThan, isLessThanOrEqualTo, isLessThanOrEqualTo, isNotEqualTo, isNotEqualTo, isSpecialOperator, isSpecialVariable, javaInstance, javaInstance, LDB, length, LENGTH, listp, LISTP, lockableInstance, LOGAND, LOGAND, LOGIOR, LOGIOR, LOGNOT, LOGXOR, LOGXOR, longValue, minusp, MINUSP, MOD, MOD, multiplyBy, multiplyBy, negate, noFillPointer, NOT, nreverse, NTH, NTH, nthcdr, numberp, NUMBERP, NUMERATOR, oddp, ODDP, plusp, PLUSP, psxhash, psxhash, push, rationalp, RATIONALP, realp, REALP, resolve, reverse, RPLACA, RPLACD, SCHAR, setCar, setCdr, setDocumentation, setSlotValue_0, setSlotValue_1, setSlotValue_2, setSlotValue_3, setSlotValue, setSlotValue, SIMPLE_STRING_P, SLOT_VALUE, STRING, stringp, STRINGP, subtract, subtract, SVREF, svset, sxhash, SYMBOLP, truncate, unreadableString, unreadableString, unreadableString, unreadableString, VECTOR_PUSH_EXTEND, VECTOR_PUSH_EXTEND, vectorp, VECTORP, vectorPushExtend, zerop, ZEROP
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUIRED

public static final int REQUIRED
See Also:
Constant Field Values

OPTIONAL

public static final int OPTIONAL
See Also:
Constant Field Values

KEYWORD

public static final int KEYWORD
See Also:
Constant Field Values

REST

public static final int REST
See Also:
Constant Field Values

AUX

public static final int AUX
See Also:
Constant Field Values
Constructor Detail

Closure

public Closure(Closure.Parameter[] required,
               Closure.Parameter[] optional,
               Closure.Parameter[] keyword,
               Symbol keys,
               Symbol rest,
               Symbol moreKeys)
Construct a closure object with a lambda-list described by these parameters.

Parameters:
required - Required parameters or an empty array for none
optional - Optional parameters or an empty array for none
keyword - Keyword parameters or an empty array for none
keys - NIL if the lambda-list doesn't contain &key, T otherwise
rest - the &rest parameter, or NIL if none
moreKeys - NIL if &allow-other-keys not present, T otherwise

Closure

public Closure(LispObject lambdaExpression,
               Environment env)

Closure

public Closure(LispObject name,
               LispObject lambdaExpression,
               Environment env)
Method Detail

typep

public LispObject typep(LispObject typeSpecifier)
Overrides:
typep in class Function

getVariableList

public final LispObject getVariableList()

getBody

public final LispObject getBody()

getEnvironment

public final Environment getEnvironment()

execute

public LispObject execute()
Overrides:
execute in class Function

invokeArrayExecute

public final LispObject invokeArrayExecute(LispObject... objects)

execute

public LispObject execute(LispObject arg)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second,
                          LispObject third)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second,
                          LispObject third,
                          LispObject fourth)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second,
                          LispObject third,
                          LispObject fourth,
                          LispObject fifth)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second,
                          LispObject third,
                          LispObject fourth,
                          LispObject fifth,
                          LispObject sixth)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second,
                          LispObject third,
                          LispObject fourth,
                          LispObject fifth,
                          LispObject sixth,
                          LispObject seventh)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject first,
                          LispObject second,
                          LispObject third,
                          LispObject fourth,
                          LispObject fifth,
                          LispObject sixth,
                          LispObject seventh,
                          LispObject eighth)
Overrides:
execute in class Function

execute

public LispObject execute(LispObject[] args)
Overrides:
execute in class Function

processArgs

protected final LispObject[] processArgs(LispObject[] args,
                                         LispThread thread)

fastProcessArgs

protected final LispObject[] fastProcessArgs(LispObject[] args)