RFR: 8355481: Clean up MHN_copyOutBootstrapArguments [v2]

Paul Sandoz psandoz at openjdk.org
Thu May 8 19:10:56 UTC 2025


On Thu, 8 May 2025 13:06:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> It looks like @PaulSandoz wrote this code and could help review your change. I wish -4 etc had some const names instead and both versions look the same to me.

I was the one who committed this code, but i don't recall writing it, and was likely written by another contributor.

This is arguably now dead code, likely written at the time for generality in the expectation it might be used but eventually was not. I don't see any calls to this method from Java that passes in a negative start argument. This method supports accessing the prefix of known bootstrap arguments (bsm, name, type) + size information for the additional arguments, but these arguments already available in Java and passed in via up call linkage (see [MethodHandleNatives.linkDynamicConstant](https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java#L308)).

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

PR Comment: https://git.openjdk.org/jdk/pull/24825#issuecomment-2864023699


More information about the hotspot-dev mailing list