<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body><div class="auto-created-dir-div" dir="auto" style="unicode-bidi: embed;"><style>p{margin:0}</style><p>I have written a stack checker transform from scratch. The following are my observations for this task,</p><p><br></p><p># BranchInstruction</p><p><br></p><p>It would help if BranchInstruction could be divided into BinaryBranchInstruction and UnaryBranchInstruction.</p><p><br></p><p>Opcodes GOTO and GOTO_W could go in Unary as TypeKind.Void has to dealt with for method return.</p><p><br></p><p>There is a bug in java.lang.classfile.Opcode: the TypeKind for IFNONNULL should be ReferenceType.</p><p><br></p><p>#OperatorInstruction</p><p><br></p><p>It would help if OperationInstruction could be divided into Binary(IADD etc,), Unary(INEG etc.), Shift(LSHR etc,), Compare(LCMP etc) and ARRAYLENGTH.</p><p><br></p><p>There is a bug in jdk.internal.classfile.impl.CodeStackTrackerImpl: Compare(LCMP etc.) return IntType not LongType etc. as returned by typeKind()</p><p><br></p><p>Regards</p><p>David</p><p><br></p><p><br></p><p><br></p></div></body></html>