Fixed hang-up issue on ObjectOutputStream

master
Stiver 11 years ago
parent 55beef6b7e
commit 3b9b180d94
  1. 10
      src/de/fernflower/modules/decompiler/exps/FunctionExprent.java
  2. 13
      src/de/fernflower/modules/decompiler/sforms/SSAUConstructorSparseEx.java

@ -490,6 +490,16 @@ public class FunctionExprent extends Exprent {
return "--"+wrapOperandString(lstOperands.get(0), true, indent); return "--"+wrapOperandString(lstOperands.get(0), true, indent);
case FUNCTION_INSTANCEOF: case FUNCTION_INSTANCEOF:
return wrapOperandString(lstOperands.get(0), true, indent)+" instanceof "+wrapOperandString(lstOperands.get(1), true, indent); return wrapOperandString(lstOperands.get(0), true, indent)+" instanceof "+wrapOperandString(lstOperands.get(1), true, indent);
case FUNCTION_LCMP: // shouldn't appear in the final code
return "__lcmp__("+wrapOperandString(lstOperands.get(0), true, indent)+","+wrapOperandString(lstOperands.get(1), true, indent)+")";
case FUNCTION_FCMPL: // shouldn't appear in the final code
return "__fcmpl__("+wrapOperandString(lstOperands.get(0), true, indent)+","+wrapOperandString(lstOperands.get(1), true, indent)+")";
case FUNCTION_FCMPG: // shouldn't appear in the final code
return "__fcmpg__("+wrapOperandString(lstOperands.get(0), true, indent)+","+wrapOperandString(lstOperands.get(1), true, indent)+")";
case FUNCTION_DCMPL: // shouldn't appear in the final code
return "__dcmpl__("+wrapOperandString(lstOperands.get(0), true, indent)+","+wrapOperandString(lstOperands.get(1), true, indent)+")";
case FUNCTION_DCMPG: // shouldn't appear in the final code
return "__dcmpg__("+wrapOperandString(lstOperands.get(0), true, indent)+","+wrapOperandString(lstOperands.get(1), true, indent)+")";
} }
if(functype <= FUNCTION_I2S) { if(functype <= FUNCTION_I2S) {

@ -110,9 +110,9 @@ public class SSAUConstructorSparseEx {
HashSet<String> updated = new HashSet<String>(); HashSet<String> updated = new HashSet<String>();
do { do {
//System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava()); // System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava());
ssaStatements(dgraph, updated, false); ssaStatements(dgraph, updated, false);
//System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava()); // System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava());
} while(!updated.isEmpty()); } while(!updated.isEmpty());
@ -142,6 +142,15 @@ public class SSAUConstructorSparseEx {
varmaparr[1] = varmaparr[0]; varmaparr[1] = varmaparr[0];
} }
// quick solution: 'dummy' field variables should not cross basic block borders (otherwise problems e.g. with finally loops - usage without assignment in a loop)
// For the full solution consider adding a dummy assignment at the entry point of the method
boolean allow_field_propagation = node.succs.isEmpty() || (node.succs.size() == 1 && node.succs.get(0).preds.size() == 1);
if(!allow_field_propagation && varmaparr[0] != null) {
varmaparr[0].removeAllFields();
varmaparr[1].removeAllFields();
}
boolean this_updated = !mapsEqual(varmaparr[0], outVarVersions.get(node.id)) boolean this_updated = !mapsEqual(varmaparr[0], outVarVersions.get(node.id))
|| (outNegVarVersions.containsKey(node.id) && !mapsEqual(varmaparr[1], outNegVarVersions.get(node.id))); || (outNegVarVersions.containsKey(node.id) && !mapsEqual(varmaparr[1], outNegVarVersions.get(node.id)));

Loading…
Cancel
Save