setJump adds the gen kill info.

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@458 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 2a2e89452e
commit 512c890f51
  1. 9
      jode/jode/flow/InstructionContainer.java

@ -36,14 +36,17 @@ public abstract class InstructionContainer extends StructuredBlock {
} }
public InstructionContainer(Expression instr, Jump jump) { public InstructionContainer(Expression instr, Jump jump) {
this.instr = instr; this(instr);
setJump(jump);
}
public void setJump(Jump jump) {
super.setJump(jump);
if (instr instanceof LocalVarOperator) { if (instr instanceof LocalVarOperator) {
LocalVarOperator varOp = (LocalVarOperator) instr; LocalVarOperator varOp = (LocalVarOperator) instr;
used.addElement(varOp.getLocalInfo());
jump.gen.addElement(varOp.getLocalInfo()); jump.gen.addElement(varOp.getLocalInfo());
jump.kill.addElement(varOp.getLocalInfo()); jump.kill.addElement(varOp.getLocalInfo());
} }
setJump(jump);
} }
/** /**

Loading…
Cancel
Save