Then it’s a terrible and confusing name for an opcode :)


> On Apr 14, 2020, at 10:08 AM, [email protected] wrote:
> 
> 
> 
> De: "Brian Goetz" <[email protected]>
> À: "Remi Forax" <[email protected]>
> Cc: "Frederic Parain" <[email protected]>, "valhalla-spec-experts" 
> <[email protected]>
> 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.
> 
> No,
> 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.
> 
> Rémi
> 

Reply via email to