RFR: 8364618: Sort share/code includes

Aleksey Shipilev shade at openjdk.org
Mon Aug 4 10:19:54 UTC 2025


On Mon, 4 Aug 2025 10:07:28 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:

>> src/hotspot/share/code/aotCodeCache.cpp line 60:
>> 
>>> 58: #include "gc/z/zBarrierSetRuntime.hpp"
>>> 59: #endif
>>> 60: #ifdef COMPILER2
>> 
>> This one looks weird. This splits `#ifdef COMPILER1` and `#ifdef COMPILER2` blocks.
>> Was that the automatic move, or have you moved it yourself?
>
> I did it myself, so the conditionally included modules are sorted alphabetically. Should I revert it?

Yes, revert this hunk. The GC blocks are somewhat odd (notice the difference between `#if` and `#ifdef`), and I think the common style is to include them the last. Not that it is codified anywhere, AFAICS.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26616#discussion_r2251044260


More information about the hotspot-compiler-dev mailing list