|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.liveness.LiveSet
public class LiveSet
This file provides a sorted set of registers.
Field Summary | |
---|---|
private static boolean |
DEBUG
just used for debugging |
private LiveSetElement |
first
The beginning of the list |
Constructor Summary | |
---|---|
LiveSet()
|
Method Summary | |
---|---|
boolean |
add(LiveSet additionList)
Adds the contents of the given set to this set. |
void |
add(RegisterOperand item)
create a new object from the passed parameter and add it to the list |
void |
clear()
Empties the set. |
boolean |
contains(Register item)
Determines if the item passed is in the current set |
private LiveSetElement |
createAndAddToCurrentList(RegisterOperand register,
LiveSetElement prevElement)
Copy the newElement into a new object and add it to the list after prevElement. |
LiveSetEnumerator |
enumerator()
Returns an enumerator of the list |
private LiveSetElement |
getNextPtr(LiveSetElement ptr)
Inspects the passed ptr, if it is nonnull it returns its next field otherwise, it returns "first" |
boolean |
isEmpty()
Is the current set empty? |
void |
remove(LiveSet removalList)
Removes the contents of the passed set from the this set, i.e., this = this - removeList |
(package private) void |
remove(RegisterOperand item)
Removes the passed register from this set. |
String |
toString()
String-i-fy the current list |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private LiveSetElement first
private static final boolean DEBUG
Constructor Detail |
---|
public LiveSet()
Method Detail |
---|
public final void clear()
public boolean contains(Register item)
item
- the register to search for
public void add(RegisterOperand item)
item
- an object that contains the register to used in the newly
created objectpublic boolean add(LiveSet additionList)
additionList
- the set to add to this set
public void remove(LiveSet removalList)
this = this - removeList
removalList
- the list to remove from this setvoid remove(RegisterOperand item)
item
- the registerOperand holding the register of interestpublic boolean isEmpty()
true
iff the set is emptypublic String toString()
toString
in class Object
public final LiveSetEnumerator enumerator()
private LiveSetElement createAndAddToCurrentList(RegisterOperand register, LiveSetElement prevElement)
register
- the element to copy and insertprevElement
- the element on the current list to insert after
or null, indicating insert at the front
private LiveSetElement getNextPtr(LiveSetElement ptr)
ptr
- the ptr to look at it
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |