[External] : labels

Chen Liang chen.l.liang at oracle.com
Wed Jan 29 18:07:58 UTC 2025


Hi Mark,
An approach can be to use a List<Object>. When you process each item, you pattern match like:

switch(item) {
    case LabelTarget lt -> {} // drop
    case CodeElement coe -> cob.with(coe);
    case Label l -> cob.labelBinding(l);
}

I think that can solve your issue.

And I see the transform problem with stack maps is caused by your inability to handle labels. This should be able to avoid those issues in the future.

Regards,
Chen Liang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20250129/75901b49/attachment.htm>


More information about the classfile-api-dev mailing list