[lworld] RFR: 8245584: [lworld] LW3 core reflection update

Mandy Chung mchung at openjdk.java.net
Thu May 21 22:15:59 UTC 2020


This patch updates the core reflection for the new language model for inline classes.

- `Class::isInlineClass` returns true for inline classes
- `Class::valueType` returns the value projection of an inline class
- `Class::referenceType` returns the reference projection if it's an inline class,
    or this class if it's not an inline class

If this class has no val type or ref type, `Class::valueType` and `Class::referenceType`
return an empty `Optional`.   We can re-examine  if we should modernize Class API shape
where  we can rather than holding to the tradition.

I updated TestIntrinsics.java to use the new APIs for now to keep it compiled.
This test will be updated when the intrinsification of the old API `Class::asPrimaryType`
and `Class:asIndirectType` is removed.

-------------

Commit messages:
 - Class::valueType and Class::referenceType return Optional
 - 8245584: [lworld] LW3 core reflection update

Changes: https://git.openjdk.java.net/valhalla/pull/53/files
 Webrev: https://webrevs.openjdk.java.net/valhalla/53/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8245584
  Stats: 545 lines in 40 files changed: 44 ins; 238 del; 263 mod
  Patch: https://git.openjdk.java.net/valhalla/pull/53.diff
  Fetch: git fetch https://git.openjdk.java.net/valhalla pull/53/head:pull/53

PR: https://git.openjdk.java.net/valhalla/pull/53



More information about the valhalla-dev mailing list