RFR: 8360023: Add an insertion sort implementation to Hotspot [v4]
Stefan Karlsson
stefank at openjdk.org
Mon Jun 23 18:06:28 UTC 2025
On Fri, 20 Jun 2025 10:58:23 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Sort the "#include" lines alphabetically.
>
> I assume you want to have `unittest.hpp` above the `utilities` files. I have done that. I was confused because the convention in this area is pretty blurry as many files have the `unittest.hpp` as their last include.
The includes in our gtests are a bit of a mess because there's a requirement to put unittest.hpp last, but helper files tend to also include unittest.hpp and breaking that rule. I would suggest that you sort the normal hotspot includes and put the test includes (none here) last.
You also need to fix:
<utilities/globalDefinitions.hpp>
to be
"utilities/globalDefinitions.hpp"
for all HotSpot header files.
In case you haven't seen it, here's the style guide for HotSpot includes:
https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md#source-files
and here's a tool you can run on your non-gtest HotSpot files:
https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/sources/SortIncludes.java
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25895#discussion_r2162184028
More information about the hotspot-dev
mailing list