Question on layer/peeling
Brian Goetz
brian.goetz at oracle.com
Tue Jan 6 22:32:27 UTC 2015
But bytecodes are supplemented by the BytecodeMapping attribute, which
reify the (static) instantiated type (as outlined in the SotS writeup,
and which you can see by running javap on a class compiled with the
valhalla compiler.)
On 1/6/2015 5:14 PM, Timo Kinnunen wrote:
> The type in bytecode will be Object, but the type in source code will be V, with V=boxed complex number, for example. The idiom I’m thinking of is
>
>
> Complex complex = numbers.get(nonexistentKey);
>
> if(complex == null) return;
>
> calculate(complex.re, complex.im);
>
>
>
>
>
>
> (Complex is a value type, numbers is a Java 5 hash map)
>
>
More information about the valhalla-dev
mailing list