RFR: 8247910: Improve alignment and power-of-2 utilities using C++14
Stefan Karlsson
stefank at openjdk.java.net
Mon Sep 14 07:43:02 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
Looks good!
-------------
Marked as reviewed by stefank (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/126
More information about the hotspot-dev
mailing list