On Fri, 8 May 2026 20:24:27 GMT, Dan Smith <[email protected]> wrote:
>>> javac will always leave this in slot 0, and I believe the language rules >>> don't allow users to store it in a different local variable during early >>> construction. >> >> Does it mean the check for slot 0 is right and we have to keep it? There are >> no problems with `this` object stored in different slots during late object >> construction because the value object has been fully initialized. > > You understand your requirements better than I do, but I would think the > invariants you're trying to preserve need to work on all class files, > javac-generated or not? The invariant about slot of `this` object was set a long time ago when JVMTI was introduced. Now is not a good time to change it. We normally keep the spec and implementation compatible if possible. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2412#discussion_r3211260069
