git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@76 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 5b9cf9ff27
commit 2dad930eb6
  1. 4
      jode/jode/decompiler/LocalInfo.java
  2. 1
      jode/jode/expr/AssignOperator.java
  3. 9
      jode/jode/expr/ComplexExpression.java
  4. 7
      jode/jode/expr/Expression.java

@ -85,7 +85,9 @@ public class LocalInfo {
LocalVarOperator lvo =
(LocalVarOperator) enum.nextElement();
if (needTypeUpdate) {
// System.err.println("updating "+lvo+" in "+lvo.parent);
if (Decompiler.isTypeDebugging)
System.err.println("updating " + lvo + " in "
+ ((Expression)lvo).parent);
lvo.updateType();
}
shadow.operators.addElement(lvo);

@ -34,6 +34,7 @@ public class AssignOperator extends Operator {
public AssignOperator(int op, StoreInstruction store) {
super(store.getLValueType(), op);
this.store = store;
store.parent = this;
}
public StoreInstruction getStore() {

@ -108,10 +108,13 @@ public class ComplexExpression extends Expression {
StoreInstruction store = (StoreInstruction) e.getOperator();
if (store.matches(operator)) {
((ComplexExpression) e).operator =
new AssignOperator(store.getOperatorIndex(), store);
operator.parent = null;
operator = new AssignOperator(store.getOperatorIndex(), store);
operator.parent = this;
this.subExpressions = ((ComplexExpression) e).subExpressions;
return e;
for (int i=0; i < subExpressions.length; i++)
subExpressions[i].parent = this;
return this;
}
for (int i=0; i < subExpressions.length; i++) {
Expression combined = subExpressions[i].combine(e);

@ -22,7 +22,7 @@ package jode;
public abstract class Expression {
protected Type type;
ComplexExpression parent = null;
Expression parent = null;
public Expression(Type type) {
this.type = type;
@ -36,6 +36,11 @@ public abstract class Expression {
this.type = newType;
}
public void updateType() {
if (parent != null)
parent.updateType();
}
/**
* Get the number of operands.
* @return The number of stack entries this expression needs.

Loading…
Cancel
Save