Re: Inserting new label node
Eric Bruneton <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi,
unless you need to store specific user information inside Label objects,
you don't need and *must not* use the 'info' field of this class (e.g.,
the 'createLabel' method in your previous post should simply return a
'new LabelNode()', it does not have to create a Label, nor to set its
info field). The info field is used internally by the tree package, but
you must not rely on its value. Normally, when using the tree package,
you should only use LabelNode objects, and no Label objects.
Eric
28/07/2011 18:07, Yudi Zheng wrote:
> Hi,
>
> We have encountered some buggy behavior while using LabelNodes.
> The LabelNode is correctly bound with Label but it's not true in the
> opposite direction. We believe that Label should be also properly
> bound with LabelNode as it is required for example by
> MethodNode.getLabelNode() method.
>
> protected LabelNode getLabelNode(final Label l) {
> if (!(l.info <http://l.info> instanceof LabelNode)) {
> l.info <http://l.info> = new LabelNode(l);
> }
> return (LabelNode) l.info <http://l.info>;
> }
>
>
> We are proposing following changes (see attached patch) to the
> LabelNode class. Do you think it makes sense?
>
> PS: We still didn't receive reply to our previous mail :)
>
> Best regards,
> Yudi
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws