[mvt] RFR - add support for q-types in lambda forms

Paul Sandoz paul.sandoz at oracle.com
Fri Jun 2 17:50:22 UTC 2017


> On 2 Jun 2017, at 10:27, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>> 
>>> But the other flip of the coin is to handle APIs - if you have a method handle that takes a Q-type, how do you 'bind' its argument? The APIs we have today are boxy. Some of these APIs are used internally by some of the BMH classes, so you could hit them through combinators too.
>>> 
>> Yeah:
>> 
>>   public MethodHandle bindTo(Object x)
>> 
>> Do we need something like:
>> 
>>   public MethodHandle bindToValue (__Value v)
>> 
>> ?
>> 
>> Such a bifurcation is somewhat awkward.
> Yep - it does look odd.
> 
> The current working theory is that BMH should work (but will add boxing via asType adaptation) - so, in terms of capabilities, we should be there already.
> 
> When the time comes, I think we should look at some of the complex combinators (I'm looking at you for loop :-)) and see whether intermediate boxing causes excessive penalty there.
> 

A start would be to add a simple loop test traversing over an array of Point reducing to one resulting Point. I can add something to the MVTTest, and perhaps refactor into more clearly separated tests of functionality.

Paul.


More information about the valhalla-dev mailing list