On Thu, 8 May 2025 14:57:05 GMT, Chen Liang <[email protected]> wrote:
> One of the goals of ClassFile API is to avoid updating the copy of ASM in the > JDK (now moved to the test library) to support future class file formats. > > However, some tests in hotspot turn out to parse latest class files, usually > produced by the javac in the JDK under test, to transform them to inject > desired bytecode patterns. If we keep these tests, we must keep maintaining > the ASM library to accept all current class files, which will be costly with > the upcoming project Valhalla. > > To avoid maintaining ASM down the road, we can either: > 1. Migrate the transformation to ClassFile API > 2. Set source and release version in javac flags to produce stable bytecode > > I recommend migrating to ClassFile API; javac has a deprecation policy, that > in the future, old source and target versions will no longer be supported, > and we would still need another port at that time. This pull request has now been integrated. Changeset: 3248aaf3 Author: Chen Liang <[email protected]> URL: https://git.openjdk.org/jdk/commit/3248aaf3c4f6784d5176e2a2c5bac0fbda47ee6b Stats: 608 lines in 24 files changed: 92 ins; 302 del; 214 mod 8356548: Use ClassFile API instead of ASM to transform classes in tests Reviewed-by: sspitsyn, lmesnik, coleenp, iklam ------------- PR: https://git.openjdk.org/jdk/pull/25124
