[External] : Re: ASM to OpenJDK ClassReader/ClassWriter bridge: experiences and questions

Rafael Winterhalter rafael.wth at gmail.com
Wed Aug 14 21:13:42 UTC 2024


I see, I do not use the Object-version of the method. The method requires
loaded enums anyways what ASM does not provide, and it leaves annotations
out, so it could not be used successfully anyways. I think it can be safely
removed.

Am Mi., 14. Aug. 2024 um 23:09 Uhr schrieb Chen Liang <
chen.l.liang at oracle.com>:

> For 3 I am talking about the of(Object) instead of the ofXyz ones, indeed.
> We seek to remove AnnotationValue.of(Object).
> Also thanks for the suggestion of this method on CodeBuilder. I personally
> lean more on dropping automatic computation once this method is called, but
> feel free to start another thread for more input.
>
> Chen
>
> ------------------------------
> *From:* Rafael Winterhalter <rafael.wth at gmail.com>
> *Sent:* Wednesday, August 14, 2024 3:55 PM
> *To:* Chen Liang <chen.l.liang at oracle.com>
> *Cc:* classfile-api-dev <classfile-api-dev at openjdk.org>
> *Subject:* Re: [External] : Re: ASM to OpenJDK ClassReader/ClassWriter
> bridge: experiences and questions
>
> As for (3): Do you mean the AnnotationValue.of(Object) method, or the
> entire hierarchy of AnnotationValue.ofYYY(...) methods? I am only using the
> latter methods, and I would not know of an alternative tree model. Can you
> give me a pointer?
> As for (4): I would implement this similar to stack map frames. Compute
> them by default but offer an option to keep them at zero by default:
>
> ClassFile.MethodSizeOptions.COMPUTE
> ClassFile.MethodSizeOptions.ZERO
>
> Then there could be a method on CodeBuilder such as "maxs(short, short)"
> where the relevant values are simply written to the relevant class file
> location.
>
> Best regards, Rafael
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240814/bb2c8eed/attachment.htm>


More information about the classfile-api-dev mailing list