jdk.internal.classfile.impl

Chen Liang chen.l.liang at oracle.com
Mon Dec 2 16:14:21 UTC 2024


Hi Mark,
LabelImpl::getBCI is accessible via CodeAttribute::labelToBci if you read from a class file. The code attribute can be accessed via
method.findAttribute(Attributes.CODE).orElseThrow()
If you want to use this to access the BCI for Labels in a CodeBuilder, unfortunately, that does not work. There is no guarantee that all Labels are assigned definite BCIs during that Consumer.

Regards, Chen
________________________________
From: classfile-api-dev <classfile-api-dev-retn at openjdk.org> on behalf of Mark Roberts <markro at cs.washington.edu>
Sent: Sunday, December 1, 2024 3:35 PM
To: Chen Liang <liangchenblue at gmail.com>; classfile-api-dev <classfile-api-dev at openjdk.org>
Subject: jdk.internal.classfile.impl


I have found some useful methods in jdk.internal.classfile.impl – such as LabelImpl::getBCI().  Are there any future plans to reorganize this package such that --add-exports java.base/jdk.internal.classfile.impl=ALL-UNNAMED will no longer work?



Thank you,

Mark




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20241202/426ad683/attachment-0001.htm>


More information about the classfile-api-dev mailing list