summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStiver <stiver.mail@gmail.com>2014-08-04 20:44:23 +0200
committerStiver <stiver.mail@gmail.com>2014-08-04 20:44:23 +0200
commit3b9b180d94cd259f34cf05e7275fe29e309103e2 (patch)
treea3832fc852cd8d5fdc609e091b4f294c13981aa6
parent55beef6b7e5171c90c725e6fcdf48c9d248ff07e (diff)
downloadfernflower-3b9b180d94cd259f34cf05e7275fe29e309103e2.tar
fernflower-3b9b180d94cd259f34cf05e7275fe29e309103e2.tar.gz
fernflower-3b9b180d94cd259f34cf05e7275fe29e309103e2.tar.lz
fernflower-3b9b180d94cd259f34cf05e7275fe29e309103e2.tar.xz
fernflower-3b9b180d94cd259f34cf05e7275fe29e309103e2.zip
Fixed hang-up issue on ObjectOutputStream
-rw-r--r--src/de/fernflower/modules/decompiler/exps/FunctionExprent.java10
-rw-r--r--src/de/fernflower/modules/decompiler/sforms/SSAUConstructorSparseEx.java13
2 files changed, 21 insertions, 2 deletions
diff --git a/src/de/fernflower/modules/decompiler/exps/FunctionExprent.java b/src/de/fernflower/modules/decompiler/exps/FunctionExprent.java
index e0cebe4..2610b33 100644
--- a/src/de/fernflower/modules/decompiler/exps/FunctionExprent.java
+++ b/src/de/fernflower/modules/decompiler/exps/FunctionExprent.java
@@ -490,6 +490,16 @@ public class FunctionExprent extends Exprent {
return "--"+wrapOperandString(lstOperands.get(0), true, indent);
case FUNCTION_INSTANCEOF:
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) {
diff --git a/src/de/fernflower/modules/decompiler/sforms/SSAUConstructorSparseEx.java b/src/de/fernflower/modules/decompiler/sforms/SSAUConstructorSparseEx.java
index 32c07a9..ba86aa2 100644
--- a/src/de/fernflower/modules/decompiler/sforms/SSAUConstructorSparseEx.java
+++ b/src/de/fernflower/modules/decompiler/sforms/SSAUConstructorSparseEx.java
@@ -110,9 +110,9 @@ public class SSAUConstructorSparseEx {
HashSet<String> updated = new HashSet<String>();
do {
- //System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava());
+// System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava());
ssaStatements(dgraph, updated, false);
- //System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava());
+// System.out.println("~~~~~~~~~~~~~ \r\n"+root.toJava());
} while(!updated.isEmpty());
@@ -142,6 +142,15 @@ public class SSAUConstructorSparseEx {
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))
|| (outNegVarVersions.containsKey(node.id) && !mapsEqual(varmaparr[1], outNegVarVersions.get(node.id)));