Evolving the wrapper classes
Tobi_Ajila at ca.ibm.com
Fri Jun 19 15:59:08 UTC 2020
Hi Dan S.
>>> - Where necessary (depending on the operations being performed), the
compiler generates conversions between 'I' and 'java/lang/Integer$val'. 'I'
is preferred wherever possible.
>> We have to use QInteger$val whenever we use int as a type parameter, the
rest of the time, we can use I.
> (Note that none of these conversions are "boxing" or "unboxing". They're
strictly compilation artifacts. It may be useful to come up with a new word
Given your examples can we assume that the JVM will never need to do an
implicit `Qjava/lang/Integer$val;` to `I` conversion? And these will always
be explicit conversions performed by javac?
> - The type [I is considered by the verifier to be equivalent to
[java/lang/Integer$val. Array operations (aaload, iaload, etc.) support
Could you please explain the motivation behind this? Specifically, in which
cases are iaload and aaload operations both performed on `[I` ?
If `I` and `Qjava/lang/Integer$val;` will require explicit javac
conversions, shouldn't `[I` and `[java/lang/Integer$val` also?
More information about the valhalla-spec-observers