RFR: 8330532: Improve line-oriented text parsing in HotSpot
Ioi Lam
iklam at openjdk.org
Tue Apr 23 00:28:31 UTC 2024
On Mon, 22 Apr 2024 20:47:31 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> src/hotspot/share/utilities/istream.hpp line 92:
>>
>>> 90: // Do we need to read more input (NTR)? Did we see EOF already?
>>> 91: // Was there an error getting input or allocating buffer space?
>>> 92: enum IState { NTR_STATE, EOF_STATE, ERR_STATE };
>>
>> Enum class is preferable.
>
> 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 };
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1575494922
More information about the hotspot-dev
mailing list