Integrated: 8306872: Rename Node_Array::Size()
Xin Liu
xliu at openjdk.org
Wed Apr 26 16:12:53 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 keeps 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().
This pull request has now been integrated.
Changeset: 35e80237
Author: Xin Liu <xliu at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/35e802374c18123687ccb5d74a9c2eac0f1b4c52
Stats: 7 lines in 5 files changed: 0 ins; 0 del; 7 mod
8306872: Rename Node_Array::Size()
Reviewed-by: kvn, thartmann, shade
-------------
PR: https://git.openjdk.org/jdk/pull/13659
More information about the hotspot-compiler-dev
mailing list