RFR: 8353175: Eliminate double iteration of stream in FieldDescriptor reinitialization [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Apr 10 07:47:43 UTC 2025
On Wed, 9 Apr 2025 07:50:51 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix compilation error in assertion
>
> src/hotspot/share/oops/instanceKlass.cpp line 1940:
>
>> 1938: // In DebugInfo nonstatic fields are sorted by offset.
>> 1939: GrowableArray<Tuple<int, int, FieldInfo> > fields_sorted;
>> 1940: int i = 0;
>
> Would you mind also cleaning up this usage of `i`? Seems like it can be removed and `fields_sorted.length()` can be used instead.
+1. Just purge this `i` and use `fields_sorted.length()` straight up.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24290#discussion_r2036709752
More information about the hotspot-dev
mailing list