On Fri, 7 Aug 2026 20:08:28 GMT, Matias Saavedra Silva <[email protected]>
wrote:
>> src/hotspot/share/classfile/stackMapTable.cpp line 212:
>>
>>> 210: #define CHECK_NT CHECK_(VerificationType::bogus_type())
>>> 211:
>>> 212: VerificationType StackMapReader::parse_verification_type(u1* flags,
>>> bool in_locals, TRAPS) {
>>
>> `in_locals` -> `parsing_locals`?
>>
>> A slightly bigger refactoring that would be clearer is:
>>
>> enum class ParseLoc : int {
>> Stack,
>> Locals
>> };
>>
>> VerificationType StackMapReader::parse_verification_type(u1* flags, ParseLoc
>> parse, TRAPS)
>>
>> And calls would use `ParseLocation::Stack` or `::Locals`.
>
> I think `parsing_locals` is better here. ParseLoc.Stack wouldn't be used for
> anything so a regular boolean should suffice in this case.
Can we add an `assert((flags != nullptr) == parsing_locals)` to express
intention?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32242#discussion_r3738686190