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

Chen Liang liach at openjdk.org
Sun May 12 02:42:32 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.

Chen Liang has updated the pull request incrementally with one additional commit since the last revision:

  Migrate omitted getdeps test in langtools

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19193/files
  - new: https://git.openjdk.org/jdk/pull/19193/files/23268d37..be8c25b1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=19193&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19193&range=00-01

  Stats: 13 lines in 2 files changed: 4 ins; 0 del; 9 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