RFR: 8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API

Chen Liang liach at openjdk.org
Sat May 11 19:44:49 UTC 2024


Summary of the changes:
 - Moved `com.sun.tools.classfile.Dependency` and `Dependencies` to jdeps; they are exclusively used by jdeps in sources, and they are not used in any tests too. This will ease the removal of `com.sun.tools.classfile` later.
 - A few visitor patterns have been rewritten with pattern matching, notably in:
   - `CPEntries`/`CPSelector` (removed)
   - `Dependencies.BasicDependencyFinder.Visitor` has been rewritten to use pattern matching to capture dependencies.
 - `MethodSig` and its tests have been removed in favor of `MethodTypeDesc`.
 - Otherwise, the changes are mostly mechanical replacements.

All tests in `test/langtools/tools/jdeprscan` and `test/langtools/tools/jdeps` pass.

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

Commit messages:
 - 8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API

Changes: https://git.openjdk.org/jdk/pull/19193/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19193&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8331855
  Stats: 2143 lines in 18 files changed: 740 ins; 1197 del; 206 mod
  Patch: https://git.openjdk.org/jdk/pull/19193.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19193/head:pull/19193

PR: https://git.openjdk.org/jdk/pull/19193


More information about the compiler-dev mailing list