>>>>> "Markus" == <[EMAIL PROTECTED]> writes:
[...] Markus> What you're trying to do is called "dataflow analysis" which Markus> is certainly an application area of BCEL but not supported Markus> directly. I'm doing this kind of thing too. I've started to create a simple stack simulator. Am I welcome to post it on the list ? (It's ~ 250 lines long). My appraoch was to consider objects on the stack (which can be Object references, int, long ...) instead of words. I built a custom CONSUME_STACK table in order to know how may objects are consumed on the stack for each instruction. It works fine for almost every instruction. However, there are some strange stack instructions such as DUP2_X1, which I fail to fit in this scheme. Ah but ... I think I've got it :-) 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 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 ? -- 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]>
