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

Kim Barrett kbarrett at openjdk.java.net
Tue Sep 15 04:37:20 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

This pull request has now been integrated.

Changeset: af8c6780
Author:    Kim Barrett <kbarrett at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/af8c6780
Stats:     288 lines in 12 files changed: 87 ins; 126 del; 75 mod

8247910: Improve alignment and power-of-2 utilities using C++14
8238956: Replace powerOfTwo::max_value with std::numeric_limits

Reviewed-by: tschatzl, stefank

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

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


More information about the hotspot-dev mailing list