|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractSet
net.sf.jode.flow.VariableSet
This class represents a set of Variables, which are mainly used in the in/out sets of StructuredBlock. The type of the Variables is LocalInfo.
It defines some Helper-Function, like intersecting, merging, union and difference.
Note that a variable set can contain LocalInfos that use the same slot, but are different.
Constructor Summary | |
VariableSet()
Creates a new empty variable set |
|
VariableSet(LocalInfo[] locals)
Creates a new pre initialized variable set |
Method Summary | |
boolean |
add(java.lang.Object li)
Adds a local info to this variable set. |
void |
clear()
Removes everything from this variable set. |
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object li)
Checks if the variable set contains the given local info. |
boolean |
containsSlot(int slot)
Checks if the variable set contains a local with the given name. |
LocalInfo |
findLocal(java.lang.String name)
Checks if the variable set contains a local with the given name. |
LocalInfo |
findSlot(int slot)
Checks if the variable set contains a local with the given slot. |
void |
grow(int size)
|
VariableSet |
intersect(VariableSet vs)
Intersects the current VariableSet with another and returns the intersection. |
java.util.Iterator |
iterator()
|
void |
mergeGenKill(java.util.Collection gen,
SlotSet kill)
Add the variables in gen to the current set, unless there are variables in kill using the same slot. |
void |
mergeRead(LocalInfo li)
Merges the localinfo with this gen set and remove all variables that are killed by it. |
void |
mergeWrite(LocalInfo li)
Add li to this gen set and remove all variables that are killed by it. |
boolean |
remove(java.lang.Object li)
Removes a local info from this variable set. |
int |
size()
|
Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
addAll, containsAll, isEmpty, retainAll, toArray, toArray |
Constructor Detail |
public VariableSet()
public VariableSet(LocalInfo[] locals)
Method Detail |
public final void grow(int size)
public boolean add(java.lang.Object li)
add
in interface java.util.Set
public boolean contains(java.lang.Object li)
contains
in interface java.util.Set
public final boolean containsSlot(int slot)
public LocalInfo findLocal(java.lang.String name)
public LocalInfo findSlot(int slot)
public boolean remove(java.lang.Object li)
remove
in interface java.util.Set
public int size()
size
in interface java.util.Set
public java.util.Iterator iterator()
iterator
in interface java.util.Set
public void clear()
clear
in interface java.util.Set
public java.lang.Object clone()
public VariableSet intersect(VariableSet vs)
vs
- the other variable set.public void mergeGenKill(java.util.Collection gen, SlotSet kill)
gen
- The gen set.kill
- The kill set.public void mergeRead(LocalInfo li)
li
- the variable to add.public void mergeWrite(LocalInfo li)
li
- the variable to add.
|
Jode 1.90-CVS Build Aug 6, 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |