Package gnu.kawa.functions
Class Apply
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.mapping.ProcedureN
-
- gnu.kawa.functions.Apply
-
- All Implemented Interfaces:
Named
public class Apply extends ProcedureN
Implement the standard Scheme function "apply". This has been generalized so that the last (list argument) can be any sequence, or any primitive array.
-
-
Field Summary
-
Fields inherited from class gnu.mapping.ProcedureN
applyToObject, noArgs
-
Fields inherited from class gnu.mapping.Procedure
applyMethodType, applyToConsumerDefault, applyToConsumerMethod, applyToObjectDefault, applyToObjectMethod, compilerKey, compilerXKey, inlineIfConstantSymbol, validateApplyKey, validateXApplyKey
-
Fields inherited from class gnu.mapping.PropertySet
nameKey
-
-
Constructor Summary
Constructors Constructor Description Apply(String name, ApplyToArgs applyToArgs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Object
applyToConsumer(Procedure proc, CallContext ctx)
static Object
applyToObject(Procedure proc, CallContext ctx)
int
numArgs()
ReturnminArgs()|(maxArgs<<12)
.-
Methods inherited from class gnu.mapping.Procedure
apply0, apply1, apply2, apply3, apply4, applyL, applyN, applyToConsumerDefault, applyToObjectDefault, checkArgCount, checkBadCode, getApplyMethod, getApplyToConsumerMethod, getApplyToObjectMethod, getReturnType, getSetter, getSourceLocation, isSideEffectFree, lookupApplyHandle, maxArgs, maxArgs, minArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
-
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
-
-
-
-
Constructor Detail
-
Apply
public Apply(String name, ApplyToArgs applyToArgs)
-
-
Method Detail
-
numArgs
public int numArgs()
Description copied from class:Procedure
ReturnminArgs()|(maxArgs<<12)
. We use a single virtual function to reduce the number of methods in the system, as well as the number of virtual method table entries. We shift by 12 so the number can normally be represented using a sipush instruction, without requiring a constant pool entry.
-
applyToConsumer
public static Object applyToConsumer(Procedure proc, CallContext ctx) throws Throwable
- Throws:
Throwable
-
applyToObject
public static Object applyToObject(Procedure proc, CallContext ctx) throws Throwable
- Throws:
Throwable
-
-