| java.lang.Object gnu.mapping.PropertySet gnu.mapping.Procedure gnu.mapping.ProcedureN gnu.mapping.MethodProc gnu.expr.PrimProcedure
Constructor Summary | |
public | PrimProcedure(String className, String methodName, int numArgs) | public | PrimProcedure(java.lang.reflect.Method method, Language language) | public | PrimProcedure(Method method) | public | PrimProcedure(Method method, Language language) | public | PrimProcedure(Method method, char mode, Language language) | public | PrimProcedure(Method method, LambdaExp source) | public | PrimProcedure(int opcode, Type retType, Type[] argTypes) | public | PrimProcedure(int op_code, ClassType classtype, String name, Type retType, Type[] argTypes) |
Method Summary | |
public void | apply(CallContext ctx) | public void | compile(ApplyExp exp, Compilation comp, Target target) | void | compile(Type thisType, ApplyExp exp, Compilation comp, Target target) | public static void | compileInvoke(Compilation comp, Method method, Target target, boolean isTailCall, int op_code, Type stackType) Emit the actual invoke operation, after arguments have been pushed. | public Method | getMethod() | public static PrimProcedure | getMethodFor(Procedure pproc, Expression[] args) | public static PrimProcedure | getMethodFor(Procedure pproc, Declaration decl, Expression[] args, Language language) Search for a matching static method in a procedure's class.
a PrimProcedure that is suitable, or null. | public static PrimProcedure | getMethodFor(Procedure pproc, Declaration decl, Type[] atypes, Language language) | public static PrimProcedure | getMethodFor(Class procClass, String name, Declaration decl, Expression[] args, Language language) Get PrimProcedure for matching method in given class. | public static PrimProcedure | getMethodFor(ClassType procClass, String name, Declaration decl, Expression[] args, Language language) | public static PrimProcedure | getMethodFor(ClassType procClass, String name, Declaration decl, Type[] atypes, Language language) | public String | getName() | public Type | getParameterType(int index) | final public Type[] | getParameterTypes() | public static Class | getProcedureClass(Object pproc) | public Type | getReturnType() | public Type | getReturnType(Expression[] args) | final public boolean | getStaticFlag() True if there is no 'this' parameter. | public String | getVerboseName() | final public boolean | isConstructor() | public boolean | isSpecial() | public static PrimProcedure | makeBuiltinBinary(int opcode, Type type) | public static PrimProcedure | makeBuiltinUnary(int opcode, Type type) | public int | match0(CallContext ctx) | public int | match1(Object arg1, CallContext ctx) | public int | match2(Object arg1, Object arg2, CallContext ctx) | public int | match3(Object arg1, Object arg2, Object arg3, CallContext ctx) | public int | match4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx) | public int | matchN(Object[] args, CallContext ctx) | public int | numArgs() The (minimum, number) of arguments. | final public int | opcode() | public void | print(java.io.PrintWriter ps) | public void | setReturnType(Type retType) | public boolean | takesContext() | public static boolean | takesContext(Method method) | public boolean | takesTarget() Whether we are passed an argument for the 'target' / 'receiver' / 'this'.
Normally this is false for static methods and true for non-static
methods. | public boolean | takesVarArgs() Return true iff the last parameter is a "rest" argument. | public String | toString() |
argTypes | Type[] argTypes(Code) | | The types of the method parameters.
If known, the types have been coerced to Language-specific parameters.
Does not include the implicit static link argument of some constructors.
|
mode | char mode(Code) | | 'P' means use invokespecial;
'V' means expect a target (this) argument, even if method is static;
'\0' means don't expect a target.
|
source | LambdaExp source(Code) | | If non-null, the LambdaExp that this PrimProcedure implements.
|
PrimProcedure | public PrimProcedure(int opcode, Type retType, Type[] argTypes)(Code) | | |
compileInvoke | public static void compileInvoke(Compilation comp, Method method, Target target, boolean isTailCall, int op_code, Type stackType)(Code) | | Emit the actual invoke operation, after arguments have been pushed.
Does whatever magic is needed to pass the result to target,
including passing CallContext or special handling of ConsumerTarget.
|
getParameterType | public Type getParameterType(int index)(Code) | | |
getParameterTypes | final public Type[] getParameterTypes()(Code) | | |
getStaticFlag | final public boolean getStaticFlag()(Code) | | True if there is no 'this' parameter.
|
isConstructor | final public boolean isConstructor()(Code) | | |
isSpecial | public boolean isSpecial()(Code) | | |
numArgs | public int numArgs()(Code) | | The (minimum, number) of arguments.
Doesn't not count implicit CallContext argument.
Does count 'this' argument for non-static methods.
Does count an implicit staticLink argument for constructor.
|
opcode | final public int opcode()(Code) | | |
setReturnType | public void setReturnType(Type retType)(Code) | | |
takesContext | public boolean takesContext()(Code) | | |
takesContext | public static boolean takesContext(Method method)(Code) | | |
takesTarget | public boolean takesTarget()(Code) | | Whether we are passed an argument for the 'target' / 'receiver' / 'this'.
Normally this is false for static methods and true for non-static
methods. However, we may need to be able to call a static method using
object.name(args...) (Java syntax) or
(invoke object 'name args...) (Scheme syntax).
This includes when the
object is implied.
In this case we need to ignore the first argument's value.
|
takesVarArgs | public boolean takesVarArgs()(Code) | | Return true iff the last parameter is a "rest" argument.
|
Methods inherited from gnu.mapping.Procedure | public void apply(CallContext ctx) throws Throwable(Code)(Java Doc) public static void apply(Procedure proc, CallContext ctx) throws Throwable(Code)(Java Doc) abstract public Object apply0() throws Throwable(Code)(Java Doc) abstract public Object apply1(Object arg1) throws Throwable(Code)(Java Doc) abstract public Object apply2(Object arg1, Object arg2) throws Throwable(Code)(Java Doc) abstract public Object apply3(Object arg1, Object arg2, Object arg3) throws Throwable(Code)(Java Doc) abstract public Object apply4(Object arg1, Object arg2, Object arg3, Object arg4) throws Throwable(Code)(Java Doc) abstract public Object applyN(Object[] args) throws Throwable(Code)(Java Doc) public void check0(CallContext ctx)(Code)(Java Doc) public void check1(Object arg1, CallContext ctx)(Code)(Java Doc) public void check2(Object arg1, Object arg2, CallContext ctx)(Code)(Java Doc) public void check3(Object arg1, Object arg2, Object arg3, CallContext ctx)(Code)(Java Doc) public void check4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx)(Code)(Java Doc) public static void checkArgCount(Procedure proc, int argCount)(Code)(Java Doc) public void checkN(Object[] args, CallContext ctx)(Code)(Java Doc) public Procedure getSetter()(Code)(Java Doc) public String getSourceLocation()(Code)(Java Doc) public int match0(CallContext ctx)(Code)(Java Doc) public int match1(Object arg1, CallContext ctx)(Code)(Java Doc) public int match2(Object arg1, Object arg2, CallContext ctx)(Code)(Java Doc) public int match3(Object arg1, Object arg2, Object arg3, CallContext ctx)(Code)(Java Doc) public int match4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx)(Code)(Java Doc) public int matchN(Object[] args, CallContext ctx)(Code)(Java Doc) final public int maxArgs()(Code)(Java Doc) final public int minArgs()(Code)(Java Doc) public int numArgs()(Code)(Java Doc) public void set0(Object result) throws Throwable(Code)(Java Doc) public void set1(Object arg1, Object value) throws Throwable(Code)(Java Doc) public void setN(Object[] args) throws Throwable(Code)(Java Doc) public void setSetter(Procedure setter)(Code)(Java Doc) public void setSourceLocation(String file, int line)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|