From d019ab5746a8b4a70574bc706395a9f2edae20c8 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 7 Feb 1999 19:34:50 +0000 Subject: [PATCH] new copy constructor git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@207 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/flow/Jump.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/jode/jode/flow/Jump.java b/jode/jode/flow/Jump.java index fddf80d..7dcf8a6 100644 --- a/jode/jode/flow/Jump.java +++ b/jode/jode/flow/Jump.java @@ -26,7 +26,7 @@ public class Jump { */ StructuredBlock prev; /** - * The destination block of this jump. + * The destination block of this jump, null if not known, or illegal. */ FlowBlock destination; /** @@ -47,7 +47,7 @@ public class Jump { * paths form the start of the current flow block to this jump * contain (unconditional) assignments to this slot. */ - VariableSet kill = new VariableSet(); + VariableSet kill; /** * 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 * local, and that is not overwritten afterwards. */ - VariableSet gen = new VariableSet(); + VariableSet gen; public Jump (int destAddr) { this.destAddr = destAddr; + kill = new VariableSet(); + gen = new VariableSet(); } public Jump (FlowBlock 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(); } /**