On Wed, 21 Jun 2023 13:32:55 GMT, Ashutosh Mehra <d...@openjdk.org> wrote:
>> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java >> line 756: >> >>> 754: } >>> 755: } >>> 756: } >> >> Hi, it looks odd to me that we only write one short in the loop: should that >> be a bootstrap method ref, num arguments, and arguments? >> >> I was comparing with: >> https://docs.oracle.com/javase/specs/jvms/se20/jvms20.pdf >> 4.7.23 The BootstrapMethods Attribute >> >> We have bootstrap attribute written by other code, e.g. >> "src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java" >> visitBootstrapMethods >> >> "src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java" >> writeBootstrapMethods > > This is because the array returned by getBootstrapMethodAt() includes > bootstrap method ref, num arguments and arguments. getBootstrapMethodAt() > gets all the pieces and assembles them in the array which is then written out > in this loop. There is already getBootstrapSpecifierAt() which is doing the > same thing. So I just reused that implementation. ah yes thanks, hadn't got there yet 8-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14495#discussion_r1237293582