JDK-8310310 : Migrate CreateSymbols tool in make/langtools to Classfile API
  • Type: Sub-task
  • Component: tools
  • Sub-Component: jlink
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-06-19
  • Updated: 2024-05-12
Related Reports
Relates :  
Description
The CreateSymbols tool uses jdk.jdeps class file parser library to read bytecode, in CreateSymbols::loadVersionClasses. It should be converted to use the Classfile API in long run.

Also to be migrated:
test/langtools/tools/javac/platform/CanHandleClassFilesTest.java
test/langtools/tools/javac/platform/CreateSymbolsTest.java
Comments
While the buildtools resides in the "make" directory, they are really the responsibilities of the respective component teams.
22-09-2023

Note that a challenge here is that CreateSymbols has to run on the BOOT_JDK (which is by definition of version JDK N-1). It looks like the tool is currently compiled together with the bytecode parser from the current (JDK N) source for jdk.jdeps, but targeting the BOOT_JDK version, instead of using the bytecode parser in jdk.jdeps in the BOOT_JDK itself. The reason for this is likely that the bytecode parser needs to be able to handle JDK N bytecode. If CreateSymbols is to use the new classfile API, then that API needs to be built for and runnable on the BOOT_JDK as well. Is that part of the design for the new API?
28-08-2023