RFR: 8333749: Consolidate ConstantDesc conversion in java.base [v3]
ExE Boss
duke at openjdk.org
Fri Jun 7 09:29:15 UTC 2024
On Thu, 6 Jun 2024 21:44:59 GMT, Chen Liang <liach at openjdk.org> wrote:
>> In java.base, especially in bytecode generators, we have many different methods converting known valid Class and MethodType into ClassDesc and MethodTypeDesc. These conversions should be consolidated into the same utility method for the ease of future maintenance.
>
> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>
> - Merge branch 'master' of https://github.com/openjdk/jdk into cleanup/consolidate-todesc
> - Add referenceClassDesc, move ReferenceClassDescImpl.ofValidatedBinaryName to ConstantUtils.binaryNameToDesc
> - mt -> md (desc)
> - Missed license header
> - Consolidate class/mt to desc operations
This could probably also update `Class::describeConstable()` to use `ReferenceClassDesc::ofValidated(String)` for non‑hidden reference types:
https://github.com/openjdk/jdk/blob/40b2fbd8207404961d3d23375b288cceafc3f902/src/java.base/share/classes/java/lang/Class.java#L4709-L4713
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19585#issuecomment-2154453685
More information about the core-libs-dev
mailing list