Revisit j.l.classfile.CodeBuilder API surface

Brian Goetz brian.goetz at oracle.com
Tue Jan 9 16:44:40 UTC 2024


These look good to me.  (Perhaps some of the instruction-specific 
methods could use the singleton instances of the single-bytecode 
instructions rather than the factory?)

On 1/9/2024 11:35 AM, Adam Sotona wrote:
>
> Sorry, wrong PR https://github.com/openjdk/jdk/pull/17282 in the link 
> below.
>
> *From: *classfile-api-dev <classfile-api-dev-retn at openjdk.org> on 
> behalf of Adam Sotona <adam.sotona at oracle.com>
> *Date: *Tuesday, 9 January 2024 at 17:32
> *To: *Brian Goetz <brian.goetz at oracle.com>, liangchenblue at gmail.com 
> <liangchenblue at gmail.com>, classfile-api-dev 
> <classfile-api-dev at openjdk.org>
> *Subject: *Re: Revisit j.l.classfile.CodeBuilder API surface
>
> Hi,
>
> I’ve updated the PR <https://github.com/openjdk/jdk/pull/17306> draft 
> with removal of operatormethod as obsolete and
>
> newPrimitiveArray, newReferenceArrayand 
> newMultidimensionalArraymethods as duplicate.
>
> I’ve also extended conversionmethod to support the whole matrix 
> (including multi-step conversions, no-op conversions and 
> BooleanTypeconversions), see CodeBuilder.java#L548 
> <https://github.com/openjdk/jdk/blob/027374004c9c9bf53a709c98593363043e8b7782/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java#L548>
>
> Regarding the allocateLocalI would slightly prefer to keep it, however 
> allocateSlotor allocateLocalSlotor reserveLocalSlotare also fine.
>
> Prefix newwould be confusing.
>
> Thanks,
>
> Adam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240109/36eb8429/attachment-0001.htm>


More information about the classfile-api-dev mailing list