RFR: 8294972: Convert jdk.jlink internal plugins to use the Classfile API [v14]

Alan Bateman alanb at openjdk.org
Tue Mar 21 11:34:58 UTC 2023


On Tue, 21 Mar 2023 09:10:05 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java line 1021:
>> 
>>> 1019:                                   MethodTypeDesc.of(CD_void, CD_String))
>>> 1020:                    .astore(BUILDER_VAR)
>>> 1021:                    .aload(BUILDER_VAR);
>> 
>> The methods to generate the MD all load the Builder onto the operand stack so the aload at L1021 is catching my attention, is that needed?
>
> It seems to be redundant as the following code does not expect it on stack and loads it again as needed.

Yes, I think so. If `java -XX:+UnlockDiagnosticVMOptions -XX:+BytecodeVerificationLocal -version` doesn't fail and you've run all the tests then it should be okay to drop it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12944#discussion_r1143238336


More information about the core-libs-dev mailing list