On Wed, 1 Jul 2026 08:46:08 GMT, Alan Bateman <[email protected]> wrote:
>> src/hotspot/share/prims/jvmti.xml line 3380: >> >>> 3378: <description> >>> 3379: This function can be used to return from a method with a >>> return type >>> 3380: of <code>void</code>, a constructor or a class initializer. >> >> I thought class initializers were implicitly disallowed because the caller >> you are returning to must be a Java frame? > > Are you thinking of PopFrame, which I don't think has ever allowed a pop of > the top-frame when in a class initializer? I guess, David is thinking of `PopFrame` which does not allow to return to a non-Java method. However, it seems that the ForceEarlyReturn<Type> functions do not have this restriction. I do not remember the exact details, but it seems there is no problem to early return to non-Java methods in general. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2604#discussion_r3508580938
