On Nov 15, 2012, at 3:32 PM, John Rose wrote:
> It can be right, but only if the actual argument is a null reference. If it
> is a non-null Byte, it must unbox to a byte and then widen to a float.
Well, actually, in this case, the NPE should not happen either.
Nulls are explicitly cast (though not merely "converted") to zeroes. (The
theory here is that an uninitialized Object reference can be usefully
reinterpreted as an uninitialized primitive value. The zero of a type is
exactly the values of an uninitialized field or array element of that type.)
Here's the spec.:
> f <em>T0</em> is a reference and <em>T1</em> a primitive,
> and if the reference is null at runtime, a zero value is introduced.
So, explictCastArguments should not produce a MH which can throw NPE.
CCE is still possible, e.g., if a String is cast to a File or a float, or vice
versa.
— John
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev