RFR: 8183569: Remove duplicated flag limits in parse_xss and globals.hpp [v2]

Ioi Lam iklam at openjdk.java.net
Tue Feb 23 17:37:40 UTC 2021


On Tue, 23 Feb 2021 08:10:26 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use macros to simplify assert_compatible_type; restore code in parse_xss so the comments make sense
>
> src/hotspot/share/runtime/flags/jvmFlag.hpp line 314:
> 
>> 312: #endif
>> 313:   }
>> 314: 
> 
> Do we need this? Seems an unused duplicate to the version in jvmFlagLimit.hpp.

I left `JVMFlagLimit::assert_compatible_type` by mistake, so I deleted it. I think we can use `JVMFlag::assert_compatible_type` in other places as well to get rid of the 8x duplicated boilerplate functions such as `JVMFlag::{get_bool, get_int, get_intx, etc}`. I'll investigate and file an RFE.

For your other comments, I updated `JVMFlag::assert_compatible_type` to use macros, so there's less repetition and more uniform (no more special case for `double`). It's a little easier to maintain, but maybe not as obvious to read.

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

PR: https://git.openjdk.java.net/jdk/pull/2688


More information about the hotspot-runtime-dev mailing list