RFR: 8242039: Improve jlink VersionPropsPlugin

mark.reinhold at oracle.com mark.reinhold at oracle.com
Thu Apr 2 21:12:54 UTC 2020


2020/4/2 8:01:28 -0700, christoph.langer at sap.com:
> please review a small improvement for the jlink
> VersionPropsPlugin. The Plugin modifies the bytecode of
> java/lang/VersionProps.class to replace the initializion of certain
> vendor specific system properties with custom values. This
> modification currently adds two bytecodes per constant, a pop and
> another ldc. I overhauled it to simply replace the original ldc of the
> old value with another ldc, loading the custom value.

I thought about doing this when I originally wrote that plugin, but it’s
so awkward to achieve with ASM -- as demonstrated by your patch -- that
I concluded it wasn’t worth it.  Who will notice an extra pop in a basic
block that’s only ever executed once?  Is the complexity of this new
code worth the benefit?

- Mark


More information about the jigsaw-dev mailing list