RFR: 8247909: Improve PrimitiveConversions::cast using C++14
Stefan Karlsson
stefank at openjdk.java.net
Mon Sep 14 08:07:58 UTC 2020
On Sun, 13 Sep 2020 07:27:13 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this reimplementation of PrimitiveConversions::cast,
> using facilities from C++14. In particular, conversions involving
> only integral values or integral and enum values are now constexpr.
> Also using <type_traits> rather than HotSpot work-alikes.
>
> Had to update zForwardingEntry.hpp because of a class no longer being
> implicitly included. Improved a friend declaration while in the
> vicinity.
>
> Testing
> mach5 tier1
I think this looks good. The patch updates ZForwardingEntry to use std::true_type. Why isn't that done for the handful
other places where we use PrimitiveConversions::Translate?
src/hotspot/share/metaprogramming/primitiveConversions.hpp line 35:
> 33: class PrimitiveConversions : public AllStatic {
> 34:
> 35: // True if types are the same size and either is integral then int.
I don't get the " then int." part. Is this from an earlier version using "enable if" with types?
-------------
PR: https://git.openjdk.java.net/jdk/pull/143
More information about the hotspot-dev
mailing list