On Mon, 3 Mar 2025 14:47:00 GMT, Albert Mingkun Yang <[email protected]> wrote:
>> Thomas Schatzl has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> * fix comment (trailing whitespace)
>> * another assert when snapshotting at a safepoint.
>
> src/hotspot/share/gc/g1/g1CardTable.inline.hpp line 54:
>
>> 52: // result = 0xBBAABBAA
>> 53: inline size_t blend(size_t a, size_t b, size_t mask) {
>> 54: return a ^ ((a ^ b) & mask);
>
> The example makes it much clearer; I wonder if `return (a & ~mask) | (b &
> mask);` is more readable.
... and hope that the optimizer knows this pattern? If you insist I can do
that, brief examination of that code snippet by itself (not within this code)
showed that it does.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23739#discussion_r1977739888