null checks vs. class resolution, and translation strategy for casts
brian.goetz at oracle.com
Tue Apr 14 14:09:41 UTC 2020
Then it’s a terrible and confusing name for an opcode :)
> On Apr 14, 2020, at 10:08 AM, forax at univ-mlv.fr wrote:
> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "Frederic Parain" <frederic.parain at oracle.com>, "valhalla-spec-experts" <valhalla-spec-experts at openjdk.java.net>
> Envoyé: Mardi 14 Avril 2020 15:56:06
> Objet: Re: null checks vs. class resolution, and translation strategy for casts
> How it is better than a new opcode "unbox" with exactly the same semantics ?
> For one, an “unbox” opcode assumes that the VM understands the fictitious relationship between the val and ref projections. But these are language fictions; the VM sees only classes related by extension and sealing.
> your assuming that the semantics of unbox implies that the verifier will check for 'sealness', this is not the case, unbox <==> checkcast restricted to inline type (so with eager loading).
> You're free to unbox an Object to a Point, by example.
More information about the valhalla-spec-observers