Module xl.vmx

Interface Routine

All Known Implementing Classes:
ComplexMethod, MethodExpression, RoutineBase, XMethod

public interface Routine
A Routine provides a VMXState with the information that is needed to construct a stack frame in which the routine can be executed. It is a callback interface and used in the methods VMXState.invoke(Routine, int, Authorization) and VMXState.createDescriptor(Routine, int, Authorization).
Author:
Ole Kniemeyer
  • Method Summary

    Modifier and Type
    Method
    Description
    This callback method is invoked by the executing VMXState.
    int
    Computes the number of VMXState stack elements for the frame of this routine.
    int
    Computes the number of VMXState stack elements for the Java frame of this routine.
    int
    Computes the number of VMXState stack elements for the parameters of this routine.
    boolean
    Determines whether this routine expects its parameters on the Java frame or the normal frame.
  • Method Details

    • hasJavaParameters

      boolean hasJavaParameters()
      Determines whether this routine expects its parameters on the Java frame or the normal frame.
      Returns:
      true iff parameters are expected on the Java frame
    • getParameterSize

      int getParameterSize()
      Computes the number of VMXState stack elements for the parameters of this routine.
      Returns:
      the number of stack elements for parameters
    • getJavaFrameSize

      int getJavaFrameSize()
      Computes the number of VMXState stack elements for the Java frame of this routine. This includes the parameters, if any.
      Returns:
      the size of the Java frame in terms of stack elements
    • getFrameSize

      int getFrameSize()
      Computes the number of VMXState stack elements for the frame of this routine. This includes the parameters, if any.
      Returns:
      the size of the frame in terms of stack elements
    • execute

      This callback method is invoked by the executing VMXState. A return value has to be wrapped in an instance of AbruptCompletion.Return.
      Parameters:
      s - the executing VMXState
      Returns:
      the wrapped return value