check for void

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@94 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent cbfb4fb801
commit 1628fe8afb
  1. 3
      jode/jode/flow/CreateForInitializer.java
  2. 2
      jode/jode/flow/CreatePrePostIncExpression.java
  3. 3
      jode/jode/flow/FlowBlock.java

@ -45,7 +45,8 @@ public class CreateForInitializer implements Transformation {
Expression initializer =
((InstructionBlock) sequBlock.subBlocks[0]).getInstruction();
if (!(initializer.getOperator() instanceof StoreInstruction))
if (!(initializer.getOperator() instanceof StoreInstruction)
|| !initializer.getOperator().isVoid())
return false;
if (jode.Decompiler.isVerbose)

@ -96,6 +96,8 @@ public class CreatePrePostIncExpression implements Transformation {
Expression storeExpr = lastBlock.getInstruction();
store = (StoreInstruction) storeExpr.getOperator();
if (!store.isVoid())
return false;
sequBlock = (SequentialBlock) lastBlock.outer;
if (sequBlock.subBlocks[1] != lastBlock)

@ -682,7 +682,8 @@ public class FlowBlock {
if (jumps.next == null
&& jumps.prev == lastModified
&& lastModified instanceof InstructionBlock) {
&& lastModified instanceof InstructionBlock
&& ((InstructionBlock)lastModified).getInstruction().isVoid()) {
Expression instr =
((InstructionBlock)lastModified).getInstruction();

Loading…
Cancel
Save