RFR: 8243208: Clean up JVMFlag implementation [v6]

Ioi Lam iklam at openjdk.java.net
Mon Sep 14 07:31:01 UTC 2020


On Thu, 10 Sep 2020 15:32:30 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes
>> the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last
>> revision:
>>  - Merge branch 'master' into 8243208-cleanup-jvmflag-impl
>>  - Minor code clean up suggested by David Holmes
>>  - Feedback by Gerard (hotspot-dev/2020-September/043019.html)
>>  - Refactored JVMFlagLookup::hash_code(); Cleaned up LimitGetter::no_limit()
>>  - Fixed JVMFlag::is_writeable()
>>  - (a) coding style nits and comments, (b) updated HOWTO in globals.hpp, (c) added JVMFlag::check_all_flag_declarations(),
>>    (d) removed product_rw which is not used by any flags
>>  - 8243208: Clean up JVMFlag implementation
>
> Marked as reviewed by gziemski (Committer).

Maybe it's complaining about this "*" in jvmFlagLookup.hpp? How about this:

  static constexpr unsigned int hash_code(const char* s, size_t len) {
    unsigned int h = 0;
    while (len -- > 0) {
-     h = 31*h + (unsigned int) *s;
+     h = ((unsigned int)31)*h + (unsigned int) *s;
      s++;
    }
    return h;

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

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


More information about the shenandoah-dev mailing list