merge load/store if they are localload.

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@549 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent ecf68a75b4
commit 40595a91b1
  1. 9
      jode/jode/flow/CreateAssignExpression.java

@ -122,6 +122,11 @@ public class CreateAssignExpression {
if (!(loadExpr instanceof Operator) if (!(loadExpr instanceof Operator)
|| !store.matches((Operator) loadExpr)) || !store.matches((Operator) loadExpr))
return false; return false;
if (store instanceof LocalStoreOperator)
((LocalLoadOperator)loadExpr).getLocalInfo().combineWith
(((LocalStoreOperator)store).getLocalInfo());
rightHandSide = expr.getSubExpressions()[1]; rightHandSide = expr.getSubExpressions()[1];
rhsType = binop.getOperandType(1); rhsType = binop.getOperandType(1);
} else { } else {
@ -146,6 +151,10 @@ public class CreateAssignExpression {
|| !store.matches((Operator) simple)) || !store.matches((Operator) simple))
return false; return false;
if (store instanceof LocalStoreOperator)
((LocalLoadOperator)simple).getLocalInfo().combineWith
(((LocalStoreOperator)store).getLocalInfo());
rhsType = Type.tString; rhsType = Type.tString;
/* ... and remove it. */ /* ... and remove it. */

Loading…
Cancel
Save