RFR: 8319373: Serial: Refactor dirty cards scanning during Young GC [v8]
Kim Barrett
kbarrett at openjdk.org
Fri Nov 17 21:36:33 UTC 2023
On Fri, 17 Nov 2023 19:40:26 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> That is weird. Which compiler(s)? Unqualified CardValue should be fine here, and is used in other places in the same signature. It would be needed in the (out of class) definition, where the scoping is different, but shouldn't be needed here (within the class definition). (That scoping issue could be removed by using trailing return type, which has different scope too, but that would be strange style in HotSpot.)
>
> From clang 14:
>
>
> cardTableRS.cpp:349:1: error: unknown type name 'CardValue'
> CardValue* CardTableRS::find_first_dirty_card(CardValue* const start_card,
>
>
> From gcc 13:
>
>
> cardTableRS.cpp:349:1: error: 'CardValue' does not name a type; did you mean 'JavaValue'?
> 349 | CardValue* CardTableRS::find_first_dirty_card(CardValue* const start_card,
>
>
> Can you build successfully without the prefix?
My original comment was about the .hpp file. My followup comment noted that the qualification is needed in
the .cpp file, because of the different scoping (in the class definition body vs outside it). The error you are
mentioning is in the .cpp file. A leading return type is not in the scope of the function.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16492#discussion_r1397908653
More information about the hotspot-gc-dev
mailing list