Class Invoke

  • All Implemented Interfaces:
    Named

    public class Invoke
    extends Procedure
    • Field Detail

      • invoke

        public static final Invoke invoke
      • invokeStatic

        public static final Invoke invokeStatic
      • invokeSpecial

        public static final Invoke invokeSpecial
      • make

        public static final Invoke make
    • Constructor Detail

      • Invoke

        public Invoke​(String name,
                      char kind)
      • Invoke

        public Invoke​(String name,
                      char kind,
                      Language language)
    • Method Detail

      • 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
      • makeInvokeStatic

        public static ApplyExp makeInvokeStatic​(ClassType type,
                                                String name,
                                                Expression... args)
        Return an ApplyExp that will call a method with given arguments.
        Parameters:
        type - the class containing the method we want to call.
        name - the name of the method we want to call
        args - the arguments to the call
        Returns:
        an ApplyExp representing the call