Package gnu.expr

Class CompiledProc

All Implemented Interfaces:
Named

public class CompiledProc extends MethodProc
  • Field Details

    • numArgs

      protected int numArgs
  • Constructor Details

    • CompiledProc

      public CompiledProc(Object module, boolean resultGoesToConsumer, MethodHandle applyMethod, Object name, int numArgs)
    • CompiledProc

      public CompiledProc(boolean resultGoesToConsumer, MethodHandle applyMethod, Object name, int numArgs, Object argTypes)
  • Method Details

    • getModule

      public Object getModule()
    • getModuleClass

      public Class getModuleClass()
    • makeResultToObject

      public static CompiledProc makeResultToObject(Object module, MethodHandle applyMethod, Object name, int numArgs)
    • makeResultToConsumer

      public static CompiledProc makeResultToConsumer(Object module, MethodHandle applyMethod, Object name, int numArgs)
    • initResultToObject

      public void initResultToObject(Object module, MethodHandle applyMethod, Object name, int numArgs)
    • initResultToConsumer

      public void initResultToConsumer(Object module, MethodHandle applyMethod, Object name, int numArgs)
    • init

      public CompiledProc init(boolean resultGoesToConsumer, MethodHandle applyMethod, Object name, int numArgs)
    • resolveParameterTypes

      protected void resolveParameterTypes()
      Figure out parameter types. Uses reflection to get method parameter types. INCOMPLETE - does not handle procedures with optional or rest args, or with patterns.
      Overrides:
      resolveParameterTypes in class MethodProc
    • numArgs

      public int numArgs()
      Description copied from class: Procedure
      Return minArgs()|(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.
      Overrides:
      numArgs in class Procedure