new copy constructor

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@207 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent c68e14fc05
commit d019ab5746
  1. 19
      jode/jode/flow/Jump.java

@ -26,7 +26,7 @@ public class Jump {
*/ */
StructuredBlock prev; StructuredBlock prev;
/** /**
* The destination block of this jump. * The destination block of this jump, null if not known, or illegal.
*/ */
FlowBlock destination; FlowBlock destination;
/** /**
@ -47,7 +47,7 @@ public class Jump {
* paths form the start of the current flow block to this jump * paths form the start of the current flow block to this jump
* contain (unconditional) assignments to this slot. * contain (unconditional) assignments to this slot.
*/ */
VariableSet kill = new VariableSet(); VariableSet kill;
/** /**
* The gen locals. This are the locals, which can be overwritten * The gen locals. This are the locals, which can be overwritten
@ -56,14 +56,27 @@ public class Jump {
* jump that contains an (unconditional) assignments to this * jump that contains an (unconditional) assignments to this
* local, and that is not overwritten afterwards. * local, and that is not overwritten afterwards.
*/ */
VariableSet gen = new VariableSet(); VariableSet gen;
public Jump (int destAddr) { public Jump (int destAddr) {
this.destAddr = destAddr; this.destAddr = destAddr;
kill = new VariableSet();
gen = new VariableSet();
} }
public Jump (FlowBlock dest) { public Jump (FlowBlock dest) {
this.destination = dest; this.destination = dest;
kill = new VariableSet();
gen = new VariableSet();
}
public Jump (Jump jump) {
destAddr = jump.destAddr;
destination = jump.destination;
next = jump.next;
jump.next = this;
gen = (VariableSet) jump.gen.clone();
kill = (VariableSet) jump.kill.clone();
} }
/** /**

Loading…
Cancel
Save