RFR: 8243208: Clean up JVMFlag implementation
Ioi Lam
iklam at openjdk.java.net
Wed Sep 9 04:56:25 UTC 2020
On Wed, 9 Sep 2020 00:48:08 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> The initial commit [d85cbd6](https://github.com/openjdk/jdk/commit/d85cbd638f5b87c80eee9a92d10e1ac19d9bb2f8) is the
>> same patch as
>> [8243208-cleanup-jvmflag-impl.v02](https://cr.openjdk.java.net/~iklam/jdk16/8243208-cleanup-jvmflag-impl.v02/)
>> published in
>> [hotspot-dev at openjdk.java.net](https://mail.openjdk.java.net/pipermail/hotspot-dev/2020-September/042863.html). The
>> rest of the review will continue on GitHub. I will add new commits to respond to comments to the above e-mail.
>
> src/hotspot/share/runtime/flags/jvmFlagLimit.cpp line 57:
>
>> 55: void* JVMFlagLimit::constraint_func() const {
>> 56: int i = _constraint_func;
>> 57: assert(0 <= i && i <NUM_JVMFlagConstraintsEnum, "sanity");
>
> Space after < please
Fixed.
> src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp line 220:
>
>> 218:
>> 219: bool status = true;
>> 220: for (int i=0; i<NUM_JVMFlagsEnum; i++) {
>
> Spaces around binary operators please.
Fixed.
> src/hotspot/share/runtime/flags/jvmFlagLimit.hpp line 98:
>
>> 96: }
>> 97:
>> 98: #define AS_TYPED_LIMIT(type) inline JVMTypedFlagLimit<type>* as_ ## type() const { return
>> (JVMTypedFlagLimit<type>*)this; }
>
> Is it possible to use static_cast here rather than C-style cast?
I tried but got this error:
invalid static_cast from type 'const JVMFlagLimit*' to type 'const JVMTypedFlagLimit<unsigned int>*'
-------------
PR: https://git.openjdk.java.net/jdk/pull/82
More information about the shenandoah-dev
mailing list