> Hi Peter (Schneider)! [...] > it would be in general impossible to modify the code in a way that > guarantees that there are no uninitialized class instances in local > variables without risking to break the intended logic. > > If this is really true, I'm in trouble, since I cannot think of any > other way to create something like try-finally on the bytecode level.
The reason you never had a problem with it is, wether the sun compiler nor jikes will ever (never saw it :) ) move uninitialized memory to locals. The constraint is necessary to guarantee that an exception handle never will see uninitalized memory. The stack is discarded but the locals are not. The only reason to do something like it would be optimization, but the sun compiler doesn't optimizes anything. If you read the verifier section, you see that it's possible to get any type set, for any operation for any possition in the stack and local, that are possible. If you do the verifier analysis you are able to check anything you need. Although useful to see which method calls are possible :) To see how you can perform a type analyser look at the bcel verifier package. A none verifing type analyser should need no 1000 loc's The only real problem is association of JRE ant RET. -- To unsubscribe, e-mail: <mailto:bcel-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:bcel-user-help@;jakarta.apache.org>
