Re: Re: Re: Analyzer does not use stack map frames
Marcin Rzeźnicki <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Nov 3, 2010 at 5:31 PM, Eugene Kuleshov <[email protected]> wrote: >> Sorry for not mentioning, I've been talking about >> org.objectweb.asm.tree.analysis.Analyzer >> >>> I believe the Analyzer from analysis package is not using StackMap >>> data at all and that is on the purpose. >> >> Yes, quick glance at its code made me aware of this issue. But then, >> this Analyzer makes little sense if it ignores that. Could you clarify >> what the purpose was? Also, it cannot be mended by inheriting as its >> form leaves very little room for inheritance (large and hairy analyze >> method, private merge method) > > Have you studied a corresponding chapter in the ASMs User Guide book? > Basically the intent is that you can implement/extend the > Interpreter, leaving the Analyzer unchanged. There is some examples in > the mentioned book. Yes, but in fact you cannot do that. Just take a look at my example from the first mail. You cannot determine correctly type of the new value in merge. This design'd work truly great if either interpreter would have been given interface to do anything it needs or Analyzer would have been "good" enough to handle all cases. Here both are not: Interpreter cannot mask deficiencies of analysis algorithm because it even does not know whenever frame is encountered and merge method does not specify where it is being taken (if it had you could have looked it up yourself), Analyzer simply ignores this, and in practice is not extendable.So in practice it just cannot perform correct analysis in all cases, no matter what the intended pattern is. Could you give any advice on how to handle this? Many thanks. > As for AnalyzerAdapter. Nothing stops you from adding it to the > chain before building in-memory tree. > Right, but that means simply overdoing the work already (mostly) done in the tree package. That was my previous approach - maintain stack and state of locals myself - it worked but was not pretty. > regards, > Eugene -- Pozdrawiam Marcin Rzeźnicki
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