RFR(S): 8182585: [MVT] Reading an uninitialized static value type field should not throw a NPE

Tobias Hartmann tobias.hartmann at oracle.com
Thu Jun 22 13:17:34 UTC 2017


I'm now checking the static field contents at compile time and only emit a runtime null check if the field is null. I verified that this works with Fred's UninitializedValueFieldsTest [1]. If the static field access was already executed by the interpreter (and thus initialization happened), C2 does not emit a null check. I also changed the uncommon trap action to 'Action_maybe_recompile' such that the code gets a chance to be recompiled.

I updated the webrev in place:


[1] http://cr.openjdk.java.net/~fparain/vt-buffering/webrev.01/test/runtime/valhalla/valuetypes/UninitializedValueFieldsTest.java.html

More information about the valhalla-dev mailing list