ValueType.findConstructor
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Jun 26 23:24:02 UTC 2017
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.
Maurizio
On 26/06/17 22:23, Paul Sandoz wrote:
> Updated:
>
> http://cr.openjdk.java.net/~psandoz/valhalla/find-constructor/webrev/
> <http://cr.openjdk.java.net/%7Epsandoz/valhalla/find-constructor/webrev/>
>
> Paul.
>
>> On 26 Jun 2017, at 10:46, Paul Sandoz <Paul.Sandoz at oracle.com
>> <mailto:Paul.Sandoz at oracle.com>> wrote:
>>
>> Hi Maurizio,
>>
>> It’s not naive, that code reflected a reduction on some hacking in an
>> attempt to also explore construction with a default constructor
>> (there is also a disconnect here between the VCC with a constructor
>> and using vdefault with DVT). I think we should keep the constructor
>> method and implement it as you suggest with a combinator. I’ll send
>> out a simplified webrev.
>>
>> Separately, in my enthusiasm i may be going down a rabbit hole
>> regarding re-construction, arguably it’s not in the spirit of
>> minimal. Still at some point i think we should explore this notion of
>> a more extensible wither for value types (but it also seems
>> application to ref/data classes too).
>>
>> Paul.
>>
>>> On 23 Jun 2017, at 16:31, Maurizio Cimadamore
>>> <maurizio.cimadamore at oracle.com
>>> <mailto:maurizio.cimadamore at oracle.com>> wrote:
>>>
>>> Maybe a naive question - but do you need method handle builder (and
>>> extra bytecode spinning) for constructor? Can't we combine the
>>> result of findConstructor on the boxed class with the vunbox MH?
>>>
>>> Maurizio
>
More information about the valhalla-dev
mailing list