Package gnu.mapping
Class Procedure2
- java.lang.Object
-
- gnu.mapping.PropertySet
-
- gnu.mapping.Procedure
-
- gnu.mapping.Procedure2
-
- All Implemented Interfaces:
Named
- Direct Known Subclasses:
ApplyWithValues
,ArrayGet
,BinaryOp
,CallWithValues
,ClassMethods
,Compare
,Convert
,Expt
,GetNamedPart
,InstanceOf
,IntersectNodes
,IsEq
,IsEqual
,IsEqv
,ItemAt
,NodeCompare
,SetFieldProc
,Setter.SetArray
,Setter.SetList
,SlotGet
,UnionNodes
,WriteTo
public abstract class Procedure2 extends Procedure
Abstract class for 2-argument Scheme procedures. Extensions must provide apply2.
-
-
Field Summary
Fields Modifier and Type Field Description static MethodHandle
applyToObject
-
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 Procedure2()
Procedure2(String name)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Object
apply0()
Object
apply1(Object arg1)
abstract Object
apply2(Object arg1, Object arg2)
Object
apply3(Object arg1, Object arg2, Object arg3)
Object
apply4(Object arg1, Object arg2, Object arg3, Object arg4)
Object
applyN(Object[] args)
static Object
applyToObject(Procedure proc, CallContext ctx)
int
numArgs()
ReturnminArgs()|(maxArgs<<12)
.-
Methods inherited from class gnu.mapping.Procedure
applyL, 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
-
-
-
-
Field Detail
-
applyToObject
public static final MethodHandle applyToObject
-
-
Constructor Detail
-
Procedure2
public Procedure2()
-
Procedure2
public Procedure2(String name)
-
-
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.
-
applyToObject
public static Object applyToObject(Procedure proc, CallContext ctx) throws Throwable
- Throws:
Throwable
-
-