Stack Checker
Brian Goetz
brian.goetz at oracle.com
Sat Mar 16 20:10:02 UTC 2024
Thanks for the bug reports.
Can you explain a little more about what you would do differently if the
opcodes reflected the distinction between unary/binary operators, and
similarly unary/binary branch?
On 3/16/2024 4:49 AM, david32768 at btinternet.com
david32768 at btinternet.com wrote:
>
> I have written a stack checker transform from scratch. The following
> are my observations for this task,
>
>
> # BranchInstruction
>
>
> It would help if BranchInstruction could be divided into
> BinaryBranchInstruction and UnaryBranchInstruction.
>
>
> Opcodes GOTO and GOTO_W could go in Unary as TypeKind.Void has to
> dealt with for method return.
>
>
> There is a bug in java.lang.classfile.Opcode: the TypeKind for
> IFNONNULL should be ReferenceType.
>
>
> #OperatorInstruction
>
>
> It would help if OperationInstruction could be divided into
> Binary(IADD etc,), Unary(INEG etc.), Shift(LSHR etc,), Compare(LCMP
> etc) and ARRAYLENGTH.
>
>
> There is a bug in jdk.internal.classfile.impl.CodeStackTrackerImpl:
> Compare(LCMP etc.) return IntType not LongType etc. as returned by
> typeKind()
>
>
> Regards
>
> David
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240316/b89e0fdf/attachment-0001.htm>
More information about the classfile-api-dev
mailing list