RFR: 8330532: Improve line-oriented text parsing in HotSpot [v3]
John R Rose
jrose at openjdk.org
Tue Apr 23 20:13:30 UTC 2024
On Tue, 23 Apr 2024 00:25:34 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> This is a nit, but if enum class is used can we then also change to PascalCase for the enum cases?
>
> Is there an adopted style for the enumerators? I couldn't find it in the hotspot style guide. There's quite a variation today. E.g..
>
>
> enum class vmSymbolID : int { NO_SID = 0, ....};
> enum class DefaultsLookupMode { find, skip };
According to my interpretation, the relevant style guide passage is about constants:
> * Constant names may be upper-case or mixed-case, according to historical necessity. (Note: There are many examples of constants with lowercase names.)
Basically, “styles vary, follow precedent”. I followed the precedent of `JavaThreadStatus` and others, as noted elsewhere in this PR. OS-level constants have old-looking names like `EOF` and `FILENAME_MAX`. That’s also the standard for Java constant names.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1576839392
More information about the hotspot-dev
mailing list