Package gnu.mapping

Class Procedure1or2

  • All Implemented Interfaces:
    Named
    Direct Known Subclasses:
    ArithOp, load

    public abstract class Procedure1or2
    extends Procedure
    Abstract class for 1- or 2-argument Scheme procedures. Extensions must provide apply1 and apply2.
    • Field Detail

      • applyToObject

        public static final java.lang.invoke.MethodHandle applyToObject
    • Constructor Detail

      • Procedure1or2

        public Procedure1or2()
      • Procedure1or2

        public Procedure1or2​(java.lang.String name)
    • 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
      • apply0

        public java.lang.Object apply0()
        Overrides:
        apply0 in class Procedure
      • apply1

        public abstract java.lang.Object apply1​(java.lang.Object arg1)
                                         throws java.lang.Throwable
        Overrides:
        apply1 in class Procedure
        Throws:
        java.lang.Throwable
      • apply2

        public abstract java.lang.Object apply2​(java.lang.Object arg1,
                                                java.lang.Object arg2)
                                         throws java.lang.Throwable
        Overrides:
        apply2 in class Procedure
        Throws:
        java.lang.Throwable
      • apply3

        public java.lang.Object apply3​(java.lang.Object arg1,
                                       java.lang.Object arg2,
                                       java.lang.Object arg3)
        Overrides:
        apply3 in class Procedure
      • apply4

        public java.lang.Object apply4​(java.lang.Object arg1,
                                       java.lang.Object arg2,
                                       java.lang.Object arg3,
                                       java.lang.Object arg4)
        Overrides:
        apply4 in class Procedure
      • applyN

        public java.lang.Object applyN​(java.lang.Object[] args)
                                throws java.lang.Throwable
        Overrides:
        applyN in class Procedure
        Throws:
        java.lang.Throwable
      • applyToObject

        public static java.lang.Object applyToObject​(Procedure proc,
                                                     CallContext ctx)
                                              throws java.lang.Throwable
        Throws:
        java.lang.Throwable