RFR 8223351 [lworld/lw2] : Primary mirror and nullable mirror for inline type
mandy.chung at oracle.com
Wed Jun 5 00:27:09 UTC 2019
I have updated the patch to add the indirect projection type. Updated
Summary of the changes:
1. For an inline class V, V.class is the primary mirror. The secondary
is the indirect projection type which is also the nullable
Class.forName returns the primary mirror. The projection types are
used for reflection APIs to find a field of type V? or a method
with V? (i.e. L-type descriptor).
2. New APIs are added for core reflection to project an inline class its
or nullable projection type as well as query if a Class object is
indirect or inline
Class::isInlineClass (was Class::isValue)
3. Class::getName returns the same name for inline class and the
as that's the name of the class in the source
4. Class::isAssignableFrom checks properly the subtype relationship
Point <: Point? and Point? <: Object
- I didn't rename ValueKlass::value_mirror as ValueKlass and other
be renamed together in the future.
- I think AccessFlags::set_is_flattenable should be re-examined.
no longer set in lworld?
- Intrinsification of Class::asPrimaryType will need update (JDK-8225317).
I have excluded
test case in compiler/valhalla/valuetypes/TestIntrinsifics.java. I'd
need the compiler
expert to help investigating it while I think it might be related to
I capture that failing case in JDK-8225317.
- I took out the unnecessary asPrimaryType call in the tests since
V.class now returns
the primary mirror. I left several asPrimaryType calls in
TestIntrinsics as they look
like those calls are intended.
On 5/15/19 11:38 AM, Roger Riggs wrote:
> Please review Mandy's additions and changes to reflection and
> java.lang.invoke APIs
> for inline and nullable types.
> The changes go a bit deep because of the support for the Java APIs
> provided by the VM.
> This initial prototype reflects discussions about terminology and
> of concepts for inline vs nullable as described in the comments of
> Thanks for any comments and suggestions, Roger
More information about the valhalla-dev