RFR: 8247910: Improve alignment and power-of-2 utilities using C++14

Thomas Schatzl tschatzl at openjdk.java.net
Fri Sep 11 09:20:24 UTC 2020


On Fri, 11 Sep 2020 08:44:49 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change which updates the alignment and power-of-2
> utilities (utilities/align.hpp and utilities/powerOfTwo.hpp) to use
> C++14 features.
> 
> Where possible, the alignment functions are now constexpr.  This
> eliminates the need for alternate macros that needed to be used in
> constexpr contexts.
> 
> Use <type_traits> and <limits> rather than HotSpot workalikes.
> We no longer need max_value<T>(), as the problematic platform for
> std::numeric_limits<T>::max() was Solaris.
> 
> Testing: tier1

Marked as reviewed by tschatzl (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/126


More information about the hotspot-dev mailing list