Idea how to implement VT/VO compatibility in JVM

Stéphane Épardaud stef at epardaud.fr
Thu Jan 22 14:40:02 UTC 2015


On 01/22/2015 03:33 PM, Maurizio Cimadamore wrote:
>
> On 22/01/15 14:16, Stéphane Épardaud wrote:
>> And that's where you may be aware of technical issues that would make 
>> this hard that I'm not aware of yet. If it's just about being able to 
>> find back erased(A) from and instance of specialized(A) then it 
>> doesn't sound too hard, I suppose that information will be available 
>> in the runtime class for specialized(A), so `checkcast` and 
>> `instanceof` and friends can use that for checks. Pretty much the 
>> same way we'd allow these types to be interchangeable at compile-time 
>> from javac. 
> I believe you are looking at something that's vaguely resemblant of 
> this [1] (look at the 'interface injection' section) and [2]. Which is 
> a big VM feature on its own.

Well, not really because all the methods are available already in the 
class, they're not injected (at least, not more so than the specialised 
methods already implemented). It's "just" a change in the type 
equivalence predicates.


More information about the valhalla-dev mailing list