RFR: 8242888: Convert dynamic proxy to hidden classes [v2]
Chen Liang
liach at openjdk.org
Wed Sep 25 17:03:18 UTC 2024
> Please review this change that adds a new dynamic proxies implementation as hidden classes.
>
> Summary:
> 1. Adds new implementation which can be `-Djdk.reflect.useHiddenProxy=true` for early adoption.
> 2. ClassLoader.defineClass0 takes a ClassLoader instance but discards it in native code; I updated native code to reuse that ClassLoader for Proxy support.
> 3. ProxyGenerator changes mainly involve using Class data to pass Method list (accessed in a single condy) and removal of obsolete setup code generation.
>
> Comment: Since #8278, Proxy has been converted to ClassFile API, and infrastructure has changed; now, the migration to hidden classes is much cleaner and has less impact, such as preserving ProtectionDomain and dynamic module without "anchor classes", and avoiding java.lang.invoke package.
Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
- Flip flags, hidden is enabled only by choice
- Merge branch 'master' of https://github.com/openjdk/jdk into feature/hidden-proxy
- Merge branch 'master' of https://github.com/openjdk/jdk into feature/hidden-proxy
# Conflicts:
# src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java
- Missing changes to commit
- Condense legacy and modern impl
- Clean up
- Merge branch 'master' of https://github.com/openjdk/jdk into feature/hidden-proxy
- Cleanup...
- Merge branch 'master' of https://github.com/openjdk/jdk into feature/hidden-proxy
# Conflicts:
# src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java
- Fixes
- ... and 2 more: https://git.openjdk.org/jdk/compare/fb703258...16906bfb
-------------
Changes: https://git.openjdk.org/jdk/pull/19356/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19356&range=01
Stats: 82 lines in 6 files changed: 53 ins; 1 del; 28 mod
Patch: https://git.openjdk.org/jdk/pull/19356.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19356/head:pull/19356
PR: https://git.openjdk.org/jdk/pull/19356
More information about the core-libs-dev
mailing list