give up, if type changes recursively in local

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@796 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 4b66a88014
commit 90ff2f600b
  1. 8
      jode/jode/decompiler/LocalInfo.java

@ -248,6 +248,7 @@ public class LocalInfo {
return getLocalInfo().type;
}
private int loopCount = 0;
/**
* Sets a new information about the type of this local.
* The type of the local is may be made more specific by this call.
@ -256,6 +257,12 @@ public class LocalInfo {
*/
public Type setType(Type otherType) {
LocalInfo li = getLocalInfo();
if (li.loopCount++ > 5) {
GlobalOptions.err.println("Type error in local " + getName()+": "
+ li.type + " seems to be recursive.");
Thread.dumpStack();
otherType = Type.tError;
}
Type newType = li.type.intersection(otherType);
if (newType == Type.tError
&& otherType != Type.tError && li.type != Type.tError) {
@ -277,6 +284,7 @@ public class LocalInfo {
lvo.updateType();
}
}
li.loopCount--;
return li.type;
}

Loading…
Cancel
Save