check for dead code and warn verbosely in mapStackToLocal

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@344 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 251bba903d
commit 66c092d1d1
  1. 8
      jode/jode/flow/SequentialBlock.java

@ -59,8 +59,12 @@ public class SequentialBlock extends StructuredBlock {
* @return stack the stack afterwards.
*/
public VariableStack mapStackToLocal(VariableStack stack) {
return subBlocks[1].mapStackToLocal
(subBlocks[0].mapStackToLocal(stack));
VariableStack middle = subBlocks[0].mapStackToLocal(stack);
if (middle != null)
// Otherwise the second block is at least "logical" dead code
return subBlocks[1].mapStackToLocal(middle);
jode.Decompiler.err.println("Dead code after Block " + subBlocks[0]);
return null;
}
/**

Loading…
Cancel
Save