Class VmSafeMath


  • public final class VmSafeMath
    extends java.lang.Object
    Uses methods from [java.lang.(Strict)Math] where appropriate, which may benefit from special optimization by Graal. To control error messages in a single place (namely here), [ArithmeticException]s thrown by [java.lang.StrictMath] are caught and rethrown.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long abs​(long x)  
      static double add​(double x, double y)  
      static long add​(long x, long y)  
      static long decrement​(long x)  
      static long increment​(long x)  
      static double multiply​(double x, double y)  
      static long multiply​(long x, long y)  
      static double negate​(double x)  
      static long negate​(long x)  
      static long pow​(long x, long y)  
      static double remainder​(double x, double y)  
      static long remainder​(long x, long y)  
      static long toInt​(double x, com.oracle.truffle.api.nodes.Node sourceNode)  
      static int toInt32​(long x)  
      static double truncate​(double x)  
      static long truncatingDivide​(long x, long y)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • negate

        public static long negate​(long x)
      • negate

        public static double negate​(double x)
      • add

        public static long add​(long x,
                               long y)
      • add

        public static double add​(double x,
                                 double y)
      • multiply

        public static long multiply​(long x,
                                    long y)
      • multiply

        public static double multiply​(double x,
                                      double y)
      • truncatingDivide

        public static long truncatingDivide​(long x,
                                            long y)
      • remainder

        public static long remainder​(long x,
                                     long y)
      • remainder

        public static double remainder​(double x,
                                       double y)
      • toInt32

        public static int toInt32​(long x)
      • truncate

        public static double truncate​(double x)
      • toInt

        public static long toInt​(double x,
                                 com.oracle.truffle.api.nodes.Node sourceNode)
      • increment

        public static long increment​(long x)
      • decrement

        public static long decrement​(long x)
      • abs

        public static long abs​(long x)
      • pow

        public static long pow​(long x,
                               long y)