[lworld] RFR(M): Cleanup of null checks
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Jun 29 09:36:41 UTC 2018
Hi John,
On 29.06.2018 03:25, John Rose wrote:
> Reviewed. This is really good; all those deleted lines are the
> sign of a successful refactoring.
Thanks for looking at this!
> I have one suggestion: After the refactoring make_from_oop now has
> full responsibility for null checks. The boolean parameter 'flattened'
> now means "map null to default"; if it is false, then a null triggers deopt
> which (I assume) eventually gets to an NPE.> My suggestion is to rename flattened to null2default or map_null_to_default
> or default_on_null. This will make the division of responsibility clearer between
> make_from_oop and its users. The general meaning of and policy concerning
> "flattened" values is in flux, and a more specific name for this argument will make
> sure it won't become incomprehensible in the future.
That's a good suggestion, I will change the name before pushing.
Thanks,
Tobias
More information about the valhalla-dev
mailing list