JDK-8343530 : Cleanup adlc.hpp includes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 24
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-11-04
  • Updated: 2024-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
After JDK-8339783, there are may be additional cleanups possible for the includes of adlc.hpp.

adlc.hpp is supposed to ensure there are definitions for intptr_t and uintptr_t, as those types are used in adlc code. The standard location for them is <stdint.h>, so that probably ought to be directly included by adlc.hpp.  Visual Studio has defined them in <stddef.h> and "other header files".  Apparently at least one of the defining headers is being (indirectly?) included where needed.  Other platforms are getting those types via the conditional inclusion of <inttypes.h>, which includes <stdint.h> (see below).

adlc.hpp conditionally (for some unix-based targets) includes <inttypes.h>.  It's not clear why, other than for its include of <stdint.h>. If <stdint.h> were included directly then we might not need <inttypes.h> at all.

adlc.hpp includes <sys/types.h>.  It's not clear why.

Comments
To restore the cleanup that was made in https://github.com/openjdk/jdk/pull/21744, but later backed out of that PR, see: https://github.com/openjdk/jdk/pull/21744/commits/e56730775e27c612714699b1395537a481bdd26f https://github.com/openjdk/jdk/pull/21744/commits/afb50971616cf1990957c88de4a23e042dd1b963 and https://github.com/openjdk/jdk/pull/21744/commits/7eb46c33546c36d8a6e3bfb8d6ff9ca98ce84a21
04-11-2024