JVM implementation of null-restricted value class types for cast and array

Dan Smith daniel.smith at oracle.com
Mon Oct 30 17:53:57 UTC 2023


> On Oct 30, 2023, at 10:29 AM, Dan Smith <daniel.smith at oracle.com> wrote:
> 
>> On Oct 30, 2023, at 2:25 AM, Remi Forax <forax at univ-mlv.fr> wrote:
>> 
>> Hello,
>> in https://bugs.openjdk.org/browse/JDK-8317766,
>> cast and array creation are specified using the usual opcodes checkcast and anewarray but with the constant pool constant is a condy.
>> 
>> While I like the fact that those opcodes directly use a condy unlike in the parametrized VM proposal where there are intermediary constant pool constants,
>> I think this is too early to introduce suck non backward compatible design.
> 
> Possibly you're misunderstanding here: the idea would be for checkcast and anewarray to support *both* a CONSTANT_Class and a CONSTANT_Dynamic (of the appropriate shape). Fully backward compatible.

(I've updated the text to make this a little clearer.)


More information about the valhalla-spec-observers mailing list