RFR: 8243208: Clean up JVMFlag implementation [v3]

Coleen Phillimore coleenp at openjdk.java.net
Wed Sep 9 21:09:28 UTC 2020


On Wed, 9 Sep 2020 20:44:11 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/runtime/flags/jvmFlagLookup.hpp line 44:
>> 
>>> 42:     }
>>> 43:     return h;
>>> 44:   }
>> 
>> Can this function just call hash_code(s, strlen(s)) ?
>
> strlen() is not constexpr so it can't be used here. I added my hand-rolled string_len function in
> [bf90a37](https://github.com/openjdk/jdk/pull/82/commits/bf90a3765720267a8770f7bb0cc6957471ccb21b) so we can share a
> single copy of the hash calculation loop.

Nice!

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

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


More information about the shenandoah-dev mailing list