|
|
@ -19,6 +19,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package jode.flow; |
|
|
|
package jode.flow; |
|
|
|
import jode.decompiler.TabbedPrintWriter; |
|
|
|
import jode.decompiler.TabbedPrintWriter; |
|
|
|
|
|
|
|
import jode.decompiler.LocalInfo; |
|
|
|
import jode.expr.LocalStoreOperator; |
|
|
|
import jode.expr.LocalStoreOperator; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -167,19 +168,18 @@ public class SequentialBlock extends StructuredBlock { |
|
|
|
public void makeDeclaration(VariableSet done) { |
|
|
|
public void makeDeclaration(VariableSet done) { |
|
|
|
if (subBlocks[0] instanceof InstructionBlock) { |
|
|
|
if (subBlocks[0] instanceof InstructionBlock) { |
|
|
|
/* Special case: If the first block is an InstructionBlock, |
|
|
|
/* Special case: If the first block is an InstructionBlock, |
|
|
|
* it can declare the variable it uses for us. |
|
|
|
* it can declare the variable it writes to in a special way |
|
|
|
* |
|
|
|
* and that declaration will last for the second sub block. |
|
|
|
* Now add the variables used in the first block to the done |
|
|
|
|
|
|
|
* set of the second block, since the first sub block has |
|
|
|
|
|
|
|
* declared them. |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
declare = new VariableSet(); |
|
|
|
LocalInfo local = |
|
|
|
|
|
|
|
((InstructionBlock) subBlocks[0]).checkDeclaration(done); |
|
|
|
subBlocks[0].makeDeclaration(done); |
|
|
|
if (local != null) { |
|
|
|
done.unionExact(subBlocks[0].declare); |
|
|
|
done.addElement(local); |
|
|
|
subBlocks[1].makeDeclaration(done); |
|
|
|
super.makeDeclaration(done); |
|
|
|
done.subtractExact(subBlocks[0].declare); |
|
|
|
done.removeElement(local); |
|
|
|
} else |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
super.makeDeclaration(done); |
|
|
|
super.makeDeclaration(done); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|