RFR: 8365829: Multiple definitions of static 'phase_names' [v2]

Francesco Andreuzzi duke at openjdk.org
Wed Aug 20 14:48:56 UTC 2025


On Wed, 20 Aug 2025 14:26:53 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:

>> src/hotspot/share/opto/phasetype.hpp line 144:
>> 
>>> 142:   public:
>>> 143:   static const char* phase_descriptions[];
>>> 144:   static const char* phase_names[];
>> 
>> Is there a reason for these to be public rather than private?
>> Also, we "always" prefix data member names with a leading underscore; see Style Guide.
>
> `phase_name` is accessed by `static CompilerPhaseType find_phase`, should we make it a `friend` of the `CompilerPhaseTypeHelper`?

Underscore: 90e9c537709ad4c384f7efd2ed18c63a4c21b51b

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26851#discussion_r2288423428


More information about the hotspot-compiler-dev mailing list