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

Francesco Andreuzzi duke at openjdk.org
Wed Aug 20 14:30:55 UTC 2025


On Wed, 20 Aug 2025 13:15:23 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Francesco Andreuzzi has updated the pull request incrementally with seven additional commits since the last revision:
>> 
>>  - static
>>  - nn
>>  - indent
>>  - review sugg
>>  - revert
>>  - Merge branch 'resolved-default-cctor' into JDK-8365829
>>  - use copy ctor
>
> 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`?

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

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


More information about the hotspot-compiler-dev mailing list