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

Remi Forax forax at univ-mlv.fr
Mon Jul 28 23:09:08 UTC 2014


On 07/29/2014 01:02 AM, John Rose wrote:
> On Jul 28, 2014, at 3:09 PM, Remi Forax <forax at univ-mlv.fr 
> <mailto:forax at univ-mlv.fr>> wrote:
>
>> I suppose that value types will not use several slots, otherwise if 
>> you change a value type to add a field,
>> you will need to recompile all codes that use that value type.
>> So either the interpreter will treat value type as objects or it will 
>> use a double indirection ?
>> (the stack will contains an index to a stack location inside the 
>> current stack frame containing all the values of the value type).
>
> It would be unworkable to have values occupy a variable amount of 
> interpreter (JVM state) space.  The only reasonable choice is 1 slot, 
> which means (yes) some amount of slop and/or extra indirections.
>
> It also means that we ought to consider deprecating and removing the 
> double-slot pattern in a suitable version of the JVM.

yes, if you do local var slot renaming for value type when parsing the 
bytecode,
you can use the same mechanism for double.

>
> — John

Rémi



More information about the valhalla-dev mailing list