Opcode, LabelResolver & NewMultiArrayInstruction
Michael van Acken
michael.van.acken at gmail.com
Tue Jul 19 16:13:47 UTC 2022
Sorry for another post with three points.
In Opcode.java, the TypeKind of ISHR & LSHR does not match the opcode:
ISHR(Classfile.ISHR, 1, CodeElement.Kind.OPERATOR, TypeKind.FloatType),
LSHR(Classfile.LSHR, 1, CodeElement.Kind.OPERATOR, TypeKind.DoubleType),
Both CodeModel and CodeAttribute (from the published API) depend on
jdk.classfile.impl.LabelResolver (from the implementation package) for
the method labelToBci(). Maybe LabelResolver should be moved into the
published API as well?
Finally, may I ask for an overload `of(ClassDesc,int)` in
j.cf.i.NewMultiArrayInstruction similar to the one e.g. offered by
TypeCheckInstruction? Being able to create simple instructions
outside of a CodeBuilder simplifies my intermediate representation
significantly. I can handle all the simple instructions with a single
node class, and only have to define dedicated classes for more
complicated higher-level stuff. Without the ClassDesc overload, I
would have to move NMAI from the generic into the dedicated category.
-- mva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20220719/a77082ef/attachment.htm>
More information about the classfile-api-dev
mailing list