Re: CheckMethodAdapter visitLocalVariable

Buu Vinh <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Your visitLabel for the end label must be specified before visitLocalVariable and both can  be in visitMaxs, so that you can define the scope at the end of parsing. Hope this helps.

Buu Vinh

--- On Thu, 6/30/11, [email protected] <[email protected]> wrote:

From: [email protected] <[email protected]>
Subject: [asm] CheckMethodAdapter visitLocalVariable
To: [email protected]
Date: Thursday, June 30, 2011, 3:26 PM


Hi. I am trying to create a new local variable. So I have the following code:

Label l_BlockStartLabel = new Label();
m_Visitor.visitLabel(l_BlockStartLabel);
Label l_BlockEndLabel = new Label();
m_Visitor.visitLocalVariable(l_BoolName,org.objectweb.asm.Type.BOOLEAN_TYPE.getDescriptor(),null,l_BlockStartLabel,l_BlockEndLabel,l_iOnce);

m_Visitor.visitLocalVariable always throws IllegalArgumentException saying that
the endLabel should be visited first. But I put the visitLabel(l_BlockEndLabel)
at the end of the method parsing, to define a scope.

Why should endLabel be visited if I don't want to close the scope?
How should I work around this problem? 

-----Inline Attachment Follows-----


-- 
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
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.