Class BitwiseOp

  • All Implemented Interfaces:
    Named

    public class BitwiseOp
    extends ArithOp
    • Constructor Detail

      • BitwiseOp

        public BitwiseOp​(java.lang.String name,
                         int op)
    • Method Detail

      • defaultResult

        public java.lang.Object defaultResult()
        Overrides:
        defaultResult in class ArithOp
      • adjustResult

        public java.lang.Object adjustResult​(IntNum value,
                                             int code)
      • apply1

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

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

        public java.lang.Object applyN​(java.lang.Object[] args)
        Overrides:
        applyN in class Procedure
      • checkNonNegativeShift

        public static int checkNonNegativeShift​(Procedure proc,
                                                int amount)
      • shiftLeft

        public static IntNum shiftLeft​(IntNum value,
                                       int count)
      • shiftRight

        public static IntNum shiftRight​(IntNum value,
                                        int count)
      • 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