RFR: 8294982: Implementation of Classfile API [v36]

Adam Sotona asotona at openjdk.org
Fri Mar 3 15:54:56 UTC 2023


On Thu, 2 Mar 2023 20:37:37 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   StackMapFrameInfo extracted to top level from StackMapTableAttribute
>
> src/java.base/share/classes/jdk/internal/classfile/instruction/NewMultiArrayInstruction.java line 60:
> 
>> 58:     static NewMultiArrayInstruction of(ClassEntry arrayTypeEntry,
>> 59:                                        int dimensions) {
>> 60:         return new AbstractInstruction.UnboundNewMultidimensionalArrayInstruction(arrayTypeEntry, dimensions);
> 
> Should we validate that the dimensionality of `arrayType` is greater than or equal to `dimensions`?

Architectural decision is to do not provide much of validation in favour of performance, however it might be re-visited in cases like this. Please raise the validation topic at classfile-api-dev at openjdk.org, thanks.

> src/java.base/share/classes/jdk/internal/classfile/instruction/NewObjectInstruction.java line 38:
> 
>> 36:  * of a {@link CodeModel}.
>> 37:  */
>> 38: public sealed interface NewObjectInstruction extends Instruction
> 
> Should we add a helper method on `CodeBuilder` that does the new + dup + invoke special <init> dance?

That is great RFE for `CodeBuilder`, thanks.

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

PR: https://git.openjdk.org/jdk/pull/10982



More information about the build-dev mailing list