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

Yumin Qi minqi at openjdk.java.net
Mon Sep 13 19:10:53 UTC 2021


On Mon, 13 Sep 2021 12:43:59 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Let me try but I remember it does not work with constexpr initialization. This is why I move the data field to public not using the public accessor.
>
> So we are trading off use of constexpr versus broken encapsulation? :( I can't say I understand the details here.

For constexpr array --- the initialization requires every item in the array must be initialized with const expression. I have rolled back the access change. By putting the global arrays offsets and constants inside CDSConstants, and making CDSConstants a friend class of the accessed class, we can avoid such changes. Thanks!

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

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


More information about the hotspot-runtime-dev mailing list