hg: valhalla/valhalla/langtools: Add support for tracking 'any'-related opcodes

John Rose john.r.rose at oracle.com
Fri Jul 25 19:45:55 UTC 2014


On Jul 25, 2014, at 12:33 PM, Remi Forax <forax at univ-mlv.fr> wrote:

> On 07/24/2014 10:33 PM, John Rose wrote:
>> On Jul 24, 2014, at 6:21 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>> 
>>> In other words, I don't believe equals() will ever be generated - i.e. the compiler will always use if_acmpeq and the likes, which will be tagged, eventually, in the bytecode.
>> 
>> For value types (according to the current "Infant Edition") we will be implementing a strong correspondence between the methods of a value type and the methods of its box type:
> 
> Does it mean that the value type version can be seen as a specialization of the boxed type ?

I don't think so, because the boxed type is not more general than the value type.
It is simply the canonical Object-compatible representation for the JVM.

— John

P.S. Fun fact:  Values, because they are not aliasable, can have varying representations in memory, subject only to fidelity (enough bits).

This is one reason values (like primitives) are helpful for native-data integration; you can talk about tuples, complex numbers, etc., without caring how they are ordered, packed, etc., as long as the unique access path for their container knows how to break them out into registers.




More information about the valhalla-dev mailing list