On Thu, 5 Mar 2026 12:42:43 GMT, Stefan Karlsson <[email protected]> wrote:
>> Axel Boldt-Christmas has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Update cardTableBarrierSet.inline.hpp
>> - Update cardTableBarrierSet.inline.hpp
>
> src/hotspot/share/gc/shared/cardTableBarrierSet.inline.hpp line 185:
>
>> 183:
>> 184: if (!HasDecorator<decorators, IS_DEST_UNINITIALIZED>::value) {
>> 185: // Pre-barriers...
>
> I'm wondering if the code doesn't read nicer if the comments were above the
> condition:
> Suggestion:
>
> // Pre-barriers...
> if (!HasDecorator<decorators, IS_DEST_UNINITIALIZED>::value) {
>
>
> Then the two comments would be at the same "level" and it might be easier to
> see the structure of the code:
>
> // Pre-barriers...
> conditional_pre_barrier_stuff
>
> copy
>
> // Post-barriers...
> post_barrier_stuff
Should the comment be `// Pre-barriers if initialized ...`?
The reason I moved it inside was because the pre-barriers are conditional.
But I guess you can just interpret it as 'pre` section, `work` section and
`post` section. Regardless if what we do inside is conditionally no-op.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2200#discussion_r2889796826