RFR: 8261030: Avoid loading GenerateJLIClassesHelper at runtime
This moves the tracing methods added to GenerateJLIClassesHelper in JDK-8252725 to MethodHandleStatics, which avoids loading at runtime some code meant for jlink. ------------- Commit messages: - Remove unused import, copyrights - Move tracing methods and constants from GenerateJLIClassesHelper to MethodHandleStatics Changes: https://git.openjdk.java.net/jdk/pull/2376/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2376&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8261030 Stats: 69 lines in 4 files changed: 34 ins; 30 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/2376.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2376/head:pull/2376 PR: https://git.openjdk.java.net/jdk/pull/2376
On Wed, 3 Feb 2021 12:08:58 GMT, Claes Redestad <redestad@openjdk.org> wrote:
This moves the tracing methods added to GenerateJLIClassesHelper in JDK-8252725 to MethodHandleStatics, which avoids loading at runtime some code meant for jlink.
Marked as reviewed by mchung (Reviewer). src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java line 68:
66: // classes that have been or could have be pre-generated 67: static final String LF_RESOLVE = "[LF_RESOLVE]"; 68: static final String SPECIES_RESOLVE = "[SPECIES_RESOLVE]";
It is okay with me to simply hardcode these strings in GenerateJLIClassesHelper and the trace methods. src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java line 121:
119: 120: /*non-public*/ 121: static void traceLambdaForm(String name, MethodType type, Class<?> holder, MemberName resolvedMember) {
It'd be help to add a comment describing what these trace methods are for. ------------- PR: https://git.openjdk.java.net/jdk/pull/2376
This moves the tracing methods added to GenerateJLIClassesHelper in JDK-8252725 to MethodHandleStatics, which avoids loading at runtime some code meant for jlink.
Claes Redestad has updated the pull request incrementally with one additional commit since the last revision: Remove RESOLVE constants, comment the trace methods ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2376/files - new: https://git.openjdk.java.net/jdk/pull/2376/files/2931ef8a..5c2eff28 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2376&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2376&range=00-01 Stats: 21 lines in 2 files changed: 8 ins; 7 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/2376.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2376/head:pull/2376 PR: https://git.openjdk.java.net/jdk/pull/2376
On Wed, 3 Feb 2021 12:08:58 GMT, Claes Redestad <redestad@openjdk.org> wrote:
This moves the tracing methods added to GenerateJLIClassesHelper in JDK-8252725 to MethodHandleStatics, which avoids loading at runtime some code meant for jlink.
This pull request has now been integrated. Changeset: 83357b11 Author: Claes Redestad <redestad@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/83357b11 Stats: 73 lines in 4 files changed: 36 ins; 31 del; 6 mod 8261030: Avoid loading GenerateJLIClassesHelper at runtime Reviewed-by: mchung ------------- PR: https://git.openjdk.java.net/jdk/pull/2376
participants (2)
-
Claes Redestad
-
Mandy Chung