RFR: 8306872: Rename Node_Array::Size()
Vladimir Kozlov
kvn at openjdk.org
Tue Apr 25 22:16:08 UTC 2023
On Tue, 25 Apr 2023 21:28:43 GMT, Xin Liu <xliu at openjdk.org> wrote:
> Node_List inherits Node_Array, so it inherits Size(). To resolve naming conflict,
> Node_List uses size() (with little s) and keep Size() as capacity. I don't think
> it's a good practice to distinct two function using capital initial. In particular
> they have different meanings. A true story is that it took me 2 days to find a bug
> that I chose wrong one between them.
>
> This patch just renames Node_Array::Size to max. By using different names, this will
> avoid from misusing. We need to changes 6 places. 4 are for Node_List::Size() intentionally.
> 2 of them are for Node_Array::Size().
Agree.
-------------
Marked as reviewed by kvn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13659#pullrequestreview-1400835456
More information about the hotspot-compiler-dev
mailing list