Class IndyMath

java.lang.Object
org.codehaus.groovy.vmplugin.v8.IndyMath

public class IndyMath extends Object
This class contains math operations used by indy instead of the normal meta method and call site caching system. The goal is to avoid boxing, thus use primitive types for parameters and return types where possible. WARNING: This class is for internal use only. Do not use it outside the org.codehaus.groovy.vmplugin.v8 package of groovy-core.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    and(int a, int b)
     
    static long
    and(long a, long b)
     
    static boolean
    Choose a method to replace the originally chosen metaMethod to have a more efficient call path.
    static double
    div(double a, double b)
     
    static int
    leftShift(int a, int b)
     
    static long
    leftShift(long a, long b)
     
    static double
    minus(double a, double b)
     
    static int
    minus(int a, int b)
     
    static long
    minus(long a, long b)
     
    static int
    mod(int a, int b)
     
    static long
    mod(long a, long b)
     
    static double
    multiply(double a, double b)
     
    static int
    multiply(int a, int b)
     
    static long
    multiply(long a, long b)
     
    static double
    next(double d)
     
    static int
    next(int i)
     
    static long
    next(long l)
     
    static int
    or(int a, int b)
     
    static long
    or(long a, long b)
     
    static double
    plus(double a, double b)
     
    static int
    plus(int a, int b)
     
    static long
    plus(long a, long b)
     
    static double
    previous(double d)
     
    static int
    previous(int i)
     
    static long
    previous(long l)
     
    static int
    remainder(int a, int b)
     
    static long
    remainder(long a, long b)
     
    static int
    rightShift(int a, int b)
     
    static long
    rightShift(long a, long b)
     
    static int
    xor(int a, int b)
     
    static long
    xor(long a, long b)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IndyMath

      public IndyMath()
  • Method Details

    • chooseMathMethod

      public static boolean chooseMathMethod(Selector info, MetaMethod metaMethod)
      Choose a method to replace the originally chosen metaMethod to have a more efficient call path.
    • plus

      public static int plus(int a, int b)
    • minus

      public static int minus(int a, int b)
    • multiply

      public static int multiply(int a, int b)
    • remainder

      public static int remainder(int a, int b)
    • mod

      public static int mod(int a, int b)
    • or

      public static int or(int a, int b)
    • xor

      public static int xor(int a, int b)
    • and

      public static int and(int a, int b)
    • leftShift

      public static int leftShift(int a, int b)
    • rightShift

      public static int rightShift(int a, int b)
    • plus

      public static long plus(long a, long b)
    • minus

      public static long minus(long a, long b)
    • multiply

      public static long multiply(long a, long b)
    • remainder

      public static long remainder(long a, long b)
    • mod

      public static long mod(long a, long b)
    • or

      public static long or(long a, long b)
    • xor

      public static long xor(long a, long b)
    • and

      public static long and(long a, long b)
    • leftShift

      public static long leftShift(long a, long b)
    • rightShift

      public static long rightShift(long a, long b)
    • plus

      public static double plus(double a, double b)
    • minus

      public static double minus(double a, double b)
    • multiply

      public static double multiply(double a, double b)
    • div

      public static double div(double a, double b)
    • next

      public static int next(int i)
    • next

      public static long next(long l)
    • next

      public static double next(double d)
    • previous

      public static int previous(int i)
    • previous

      public static long previous(long l)
    • previous

      public static double previous(double d)