makeNonVoid added

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@87 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 425373653d
commit a98db05be7
  1. 11
      jode/jode/expr/IIncOperator.java
  2. 9
      jode/jode/expr/StoreInstruction.java

@ -57,6 +57,15 @@ implements LocalVarOperator {
return 100;
}
/**
* Makes a non void expression out of this store instruction.
*/
public void makeNonVoid() {
if (type != Type.tVoid)
throw new AssertError("already non void");
type = local.getType();
}
public boolean matches(Operator loadop) {
return loadop instanceof LocalLoadOperator &&
((LocalLoadOperator)loadop).getLocalInfo().getLocalInfo()
@ -69,7 +78,7 @@ implements LocalVarOperator {
? INC_OP : DEC_OP;
return new LocalPrePostFixOperator
(local.getType(), op, this, true).simplify();
(local.getType(), op, this, isVoid()).simplify();
}
return super.simplify();
}

@ -34,6 +34,15 @@ public abstract class StoreInstruction extends Operator {
return lvalueType;
}
/**
* Makes a non void expression out of this store instruction.
*/
public void makeNonVoid() {
if (type != Type.tVoid)
throw new AssertError("already non void");
type = lvalueType;
}
public abstract boolean matches(Operator loadop);
public abstract int getLValueOperandCount();
public abstract int getLValueOperandPriority(int i);

Loading…
Cancel
Save