RFR: 8259894: refactor parts of jvm.h into jvm_io.h and jvm_constants.h [v2]

Ioi Lam iklam at openjdk.java.net
Fri Jan 22 23:36:40 UTC 2021


On Fri, 22 Jan 2021 23:24:26 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> os.hpp is used by almost all HotSpot .o files, so if we keep jvm.h here, that defeats the purpose of this PR. As David and I discussed offline, jvm_md.h is a kludgy legacy porting layer for stuff like DIR, which is used by os.hpp.
>> 
>> jvm_md.h contains comments like the following that haven't been touched for decades .... so it's probably a good idea to not disturb it now.
>> 
>> /*
>>  * This file is currently collecting system-specific dregs for the
>>  * JNI conversion, which should be sorted out later.
>>  */
>
> What does os.hpp need from jvm_md.h ? Can that be moved to os.cpp ? I guess I can look at the file and answer my own question.

One reason is that os.hpp uses `DIR` in function declarations, and `DIR` is declared in jvm_md.h in a platform-dependent way. So we can't forward-declare `DIR` in os.hpp.

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

PR: https://git.openjdk.java.net/jdk/pull/2154


More information about the hotspot-dev mailing list