diff options
author | aclement <aclement> | 2007-05-22 09:11:40 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-05-22 09:11:40 +0000 |
commit | f458b3f74ec877f321673bf076df3016debcf0b8 (patch) | |
tree | 93738b031ecb147fa5960e8a68fd5994ebd99fd4 | |
parent | 24efa707d2366606ca439004d9588ae8309894f1 (diff) | |
download | aspectj-f458b3f74ec877f321673bf076df3016debcf0b8.tar.gz aspectj-f458b3f74ec877f321673bf076df3016debcf0b8.zip |
fix for problem LTW in multi-threaded configuration - removed static from bcel classes
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java | 19 | ||||
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java | 19 |
2 files changed, 2 insertions, 36 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java index eed275112..74788f5ea 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/BranchHandle.java @@ -63,7 +63,7 @@ package org.aspectj.apache.bcel.generic; * @see InstructionHandle * @see Instruction * @see InstructionList - * @version $Id: BranchHandle.java,v 1.2 2004/11/19 16:45:19 aclement Exp $ + * @version $Id: BranchHandle.java,v 1.3 2007/05/22 09:11:40 aclement Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public final class BranchHandle extends InstructionHandle { @@ -76,26 +76,9 @@ public final class BranchHandle extends InstructionHandle { /** Factory methods. */ - private static BranchHandle bh_list = null; // List of reusable handles static final BranchHandle getBranchHandle(BranchInstruction i) { - if(bh_list == null) return new BranchHandle(i); - else { - BranchHandle bh = bh_list; - bh_list = (BranchHandle)bh.next; - - bh.setInstruction(i); - - return bh; - } - } - - /** Handle adds itself to the list of resuable handles. - */ - protected void addHandle() { - next = bh_list; - bh_list = this; } /* Override InstructionHandle methods: delegate to branch instruction. diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java index df4b4b547..b4a2b4c8e 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionHandle.java @@ -71,7 +71,7 @@ import java.util.HashMap; * can traverse the list via an Enumeration returned by * InstructionList.elements(). * - * @version $Id: InstructionHandle.java,v 1.2 2004/11/19 16:45:19 aclement Exp $ + * @version $Id: InstructionHandle.java,v 1.3 2007/05/22 09:11:40 aclement Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> * @see Instruction * @see BranchHandle @@ -120,21 +120,11 @@ public class InstructionHandle implements java.io.Serializable { setInstruction(i); } - private static InstructionHandle ih_list = null; // List of reusable handles /** Factory method. */ static final InstructionHandle getInstructionHandle(Instruction i) { - if(ih_list == null) return new InstructionHandle(i); - else { - InstructionHandle ih = ih_list; - ih_list = ih.next; - - ih.setInstruction(i); - - return ih; - } } /** @@ -163,12 +153,6 @@ public class InstructionHandle implements java.io.Serializable { */ void setPosition(int pos) { i_position = pos; } - /** Overridden in BranchHandle - */ - protected void addHandle() { - next = ih_list; - ih_list = this; - } /** * Delete contents, i.e., remove user access and make handle reusable. @@ -180,7 +164,6 @@ public class InstructionHandle implements java.io.Serializable { i_position = -1; attributes = null; removeAllTargeters(); - addHandle(); } /** Remove all targeters, if any. |