Interest in support for saturated casts?
jodastephen at gmail.com
Fri Jan 9 16:37:31 PST 2009
Joseph D. Darcy wrote:
> One of the libraries enhancements I'd like to implement in JDK 7 is
> support for unsigned integer arithmetic, 4504839 "Java libraries
> should provide support for unsigned integer arithmetic" and related
> bugs. That would include methods to do conversions like
> Perhaps there could also be methods for saturating conversions,
> The presence of such standard methods would make it easier for HotSpot
> to intrinsify them on platforms with direct hardware support.
In a similar vein, the libraries could do with methods like:
which throw ArithmeticException rather than silently overflowing like
(int + int) and friends do. Weve had to develop these kinds of methods
More information about the core-libs-dev