RFR(S): 8182585: [MVT] Reading an uninitialized static value type field should not throw a NPE
frederic.parain at oracle.com
Tue Jun 20 17:23:17 UTC 2017
On 06/20/2017 01:17 PM, Tobias Hartmann wrote:
> Hi Roland,
> thanks for the review!
> On 20.06.2017 18:30, Roland Westrelin wrote:
>> That looks good to me but it's unfortunate we have to add a
>> runtime check.
> Yes, we could check the static field value at compile time by
> accessing it through the Java mirror (similar to
> ciField::constant_value()) and only emit a runtime check if it's
> NULL. That assumes that once the field is non-NULL it will always
> stay non-NULL which should be guaranteed, right?
Correct, because value types are non-nullable.
More information about the valhalla-dev