hg: valhalla/valhalla/langtools: Add support for tracking 'any'-related opcodes
forax at univ-mlv.fr
Mon Jul 28 22:09:56 UTC 2014
On 07/28/2014 11:10 PM, John Rose wrote:
> On Jul 28, 2014, at 12:53 PM, Dan Smith <daniel.smith at oracle.com> wrote:
>> (Final note: it probably goes without saying, but there are other things besides bytecodes that need to be specialized, too, and eventually we'll want to come up with a comprehensive list of those things.)
> The 'J' and 'D' types are a pain point, since they require slot pairs.
> In the spirit of your 'nop' technique, I suggest allocating a slot-pair to each value of a specializable type. Treat the extra slot, if unused, as padding or a nop.
yes, very good idea, so maxlocals will be always the same value for the
specializable code and all the specialized versions.
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).
> In the case of method parameters you cannot preallocate padding, but it's simple to work around: Copy the incoming parameter to a local slot-pair.
> The JIT will make that stuff go away, just like nops.
> — John
More information about the valhalla-dev