[lworld] RFR: 8247569: [lworld] Align with spec for <vnew> methods

ExE Boss duke at openjdk.org
Tue Oct 18 15:14:10 UTC 2022


On Wed, 12 Oct 2022 08:44:41 GMT, David Simms <dsimms at openjdk.org> wrote:

> Merged javac and VM work together, includes VM support (JDK-8294224)

Personally, I prefer calling it just `<new>`, which would better support [JDK‑8284239].

[JDK‑8284239]: https://bugs.openjdk.org/browse/JDK-8284239 "Consider adding `array::<new>(…)` and using it to compile `T[]::new` method references"

src/java.base/share/classes/jdk/internal/reflect/ClassFileAssembler.java line 59:

> 57:             classFileVersion += Opcodes.V_PREVIEW;
> 58:         }
> 59:         emitInt(classFileVersion);

Note that the reflection implementation intentionally uses class file version 49.0 so that the `StackMapFrames` attribute and other stricter requirements are not necessary. See [JEP 416] for details.

https://github.com/openjdk/valhalla/blob/6ae7e4d4aad5712cf2fe6ab9f98dc424fa4170cb/src/hotspot/share/classfile/verifier.hpp#L37-L44

[JEP 416]: https://openjdk.org/jeps/416

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

PR: https://git.openjdk.org/valhalla/pull/788



More information about the valhalla-dev mailing list