ValueType.findConstructor

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Jun 27 23:34:19 UTC 2017


OK - approved! Thanks for checking.

Maurizio


On 28/06/17 00:30, Paul Sandoz wrote:
>> On 26 Jun 2017, at 16:24, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>>
>> Looks good - I noted you have removed the caching - that's probably ok since unbox is cached anyway, but dunno if filterReturnValue is costly (does that go through lambda form editor?) -  and whether it would make sense to cache that too.
>>
>>
> I did some checking. It looks ok, the filterReturnValue does go through the editor, and two method handles such as say:
>
> MethodHandle mh1 = VT_Interval.findConstructor(MethodHandles.lookup(),
>                                                MethodType.methodType(void.class, int.class, int.class));
>
> MethodHandle mh2 = VT_Interval.findConstructor(MethodHandles.lookup(),
>                                                MethodType.methodType(void.class, int.class, int.class));
>
> will share the same lambda form even though the MH instances are different.
>
> Paul.
>



More information about the valhalla-dev mailing list