RFR: 8328081: Remove unnecessary return statement in method `markWord::displaced_mark_helper` [v2]

Guoxiong Li gli at openjdk.org
Wed Mar 13 15:46:15 UTC 2024


On Wed, 13 Mar 2024 15:29:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I think we do this as the matter of course, in case `fatal` is not handled as non-returning by compilers.

The method `markWord::set_displaced_mark_helper` has no return statement at the end. So I want the `markWord::displaced_mark_helper` to be consistent with `markWord::set_displaced_mark_helper`.

> Does this fix any existing compiler warning/failure?

I didn't notice the compiler warning, but the IDE `CLion` warns that the return statement is `unreachable code`.

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

PR Comment: https://git.openjdk.org/jdk/pull/18272#issuecomment-1994715843


More information about the hotspot-dev mailing list