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

Kim Barrett kim.barrett at oracle.com
Mon Sep 14 22:06:58 UTC 2020


> On Sep 14, 2020, at 3:43 AM, Stefan Karlsson <stefank at openjdk.java.net> wrote:
> 
> 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

Thanks.



More information about the hotspot-dev mailing list