>>>>> "Peter" == Peter Schneider <[EMAIL PROTECTED]> writes:
>> Let's see. DUP2_X1 works like this: >> >> Stack: ..., word3, word2, word1 -> ..., word2, word1, word3, >> word2, word1 >> >> If I really understand how it works, word2 and word1 are to >> considered a "long" value Peter> That's not really exact, they may be of type long/double Peter> using 2 slots. That's what I meant. word1 and word2 are two halves of one long or double value. Peter> This is true for all dup<x> Operations. You only have to Peter> check that pairs are never sperated. If that is validated Peter> you may simply copy the stack entrys. >> Stack: ..., value2, value1.word2, value1.word1 -> ..., >> value1.word2, value1.word1, word2, value1.word2, value1.word1 >> >> Which in my case means : >> >> Stack: ..., value2, value1 -> ..., value1, word2, value1 >> >> Am I right ? Peter> looks fine, but i wouldn't do it that way. You will have to Peter> handle local variables. That's right, I had not taken this into account. Peter> You can't analyse the stack without them, and you will have Peter> to treat the 2 slot types there, too. And i wouldn't use Peter> different methods for locals and stack. Peter> And be warned. Data flow analysis isn't really trivial, I've noticed :-) Peter> you have to consider, that it's impossible to know THE type Peter> or Object on the Stack, you allways have to deal with sets. For my purposes, I only need to know if a value is the this pointer, a field of an object or an argument. In fact I want to detect which methods are getters, setters, adders or removers. And a few other things, such as replacing java.util.* collections with my own versions that I can modify at load time. -- Laurent Martelli http://jac.aopsys.com/ [EMAIL PROTECTED] http://www.bearteam.org/~laurent/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
