hg: valhalla/valhalla: 8222634: [lworld] Javac sometimes emits incorrect ('Q') descriptors for fields.
Srikanth
srikanth.adayapalam at oracle.com
Wed Apr 17 14:02:52 UTC 2019
On 17/04/19 6:43 PM, Brian Goetz wrote:
>>> (1) Compile time null assignment to values should be tolerated (?)
>>> (2) Compiler does not tolerate the following:
>>> MyValue1?[] vBoxArray = new MyValue1?[42];
>> On (1) can I get a quick confirmation that this is what we want ? I did see some discussion regarding javac not proactively catching these and letting the VM report an NPE. But I seem to have missed the rationale behind that decision against failing early.
> On (1), I think this should be done on the basis of value set inclusion. For reference types, null-default value types, and the nullable-projection of zero-default value types (V?), null is a member of the value set; for primitives, and for zero-default value types, it is not. I think the compiler should not allow assignment of a value that is not a member of the value set.
Perfect. I must have misread a private communication from one of the
contributors that ATM I am unable to locate, but your outline clarifies
the questions I had.
javac does not yet have a notion of null default value types. Other than
that the tip behavior should match what describe above. I have half a
dozen smallish tasks to wrap the various loose ends and also test the V?
implementation more and after that I will start on the null default
value types.
Thanks
Srikanth
>
> We need better terminology….I said value and null too many times in the above paragraph.
More information about the valhalla-dev
mailing list