RFR: JDK-8267916: Make as_CompilerThread consistent with other as_*_thread methods [v2]
Albert Mingkun Yang
ayang at openjdk.java.net
Wed Jun 2 14:29:30 UTC 2021
On Wed, 2 Jun 2021 14:17:58 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Simple refactoring around `as_CompilerThread`. A new file, `compilerThread.inline.hpp`, is created to get around the circular dependency.
>
> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> cast
I encountered some circular dependencies after moving the definition to `thread.inline.hpp`, so I replaced it with a static `cast` method, as Kim instructed from an offline discussion. Note now there's a discrepancy: `CompilerThread::cast(t)` vs `t->as_Worker_thread()` (or `t->as_Java_thread()`). I can do the same for other `as_*_thread` methods as well (in this PR or another one) if people feel like this approach.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4240
More information about the hotspot-dev
mailing list