RFR: 8271569: Rename cdsoffsets.cpp to cdsConstants.cpp

Stefan Karlsson stefank at openjdk.java.net
Mon Sep 13 13:41:32 UTC 2021


On Thu, 9 Sep 2021 18:13:10 GMT, Yumin Qi <minqi at openjdk.org> wrote:

> Changed cdsOffsets.cpp to cdsConstants.cpp, now the offsets and constants are initialized static and searched separately.
> The offsets array could not use 'constexpr' since g++ on MacOs and VSC++ on Windows complained reinterpret_cast in 'offset_of' should not be used in constexpr initialization. Changed some field access for forming global list first.
> 
> Note with 'git mv' to rename cdsoffset.cpp to cdsConstants.cpp, same for cdsoffsets.hpp to cdsConstants.hpp, due to the contents changed more than 50% so git will not think cdsConstants.cpp is renamed from cdsoffsets.cpp. Instead, it is regarded as a new file.
> 
> Tests: ter1-4
> 
> Thanks
> Yumin

I saw the array size comments ...

src/hotspot/share/cds/cdsConstants.cpp line 26:

> 24: 
> 25: #include "precompiled.hpp"
> 26: #include <cstddef>

It is not stated in the style guide, but I think most files include the system headers after the HotSpot headers, separated by a blank line.

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

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


More information about the hotspot-runtime-dev mailing list