Maurizio Cimadamore maurizio.cimadamore at
Fri Jun 23 23:31:18 UTC 2017

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?


On 23/06/17 23:17, Paul Sandoz wrote:
> Hi,
> This adds a findConstructor method to ValueType:
> <>
> Next steps are to investigate re-construction: taking an existing value, one or more explicit component values, and constructing a new value by merging the implicit components of the existing value and the explicit component values. It’s a bit like one or more vwithfield calls but would go through a constructor and perform argument checks etc.
> The tricky aspect is reliably extracting out the component values and in a known order so they can be passed as arguments to the VCC constructor.
> For MVT i think we can define something useful even if it is a little fragile, so was to make construction easier.
> (There are also potential short-cuts if there is no explicit constructor and fields are either initialized to default or some other values, as i think vnew could be used directly for construction).
> Paul.

More information about the valhalla-dev mailing list