RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

Dean Long dlong at openjdk.org
Fri Sep 2 01:54:45 UTC 2022


On Fri, 2 Sep 2022 00:04:17 GMT, John R Rose <jrose at openjdk.org> wrote:

>> Refactor code from inside of CompressedStream into its own unit.
>> 
>> This code is likely to be used in future refactorings, such as JDK-8292818 (replace 96-bit representation for field metadata with variable-sized streams).
>> 
>> Add gtests.
>
> John R Rose 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 two additional commits since the last revision:
> 
>  - Merge branch 'master' of https://git.openjdk.org/jdk into compressed-stream
>  - 8292758: put support for UNSIGNED5 format into its own header file

src/hotspot/share/code/compressedStream.cpp line 85:

> 83:   const int min_expansion = UNSIGNED5::MAX_LENGTH;
> 84:   if (nsize < min_expansion*2)
> 85:     nsize = min_expansion*2;

It's not clear if this is needed or just an optimization.  Maybe add a comment.  Also, using MIN2 might be clearer.

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

PR: https://git.openjdk.org/jdk/pull/10067


More information about the hotspot-dev mailing list