|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.util.MutabilityControl
com.android.dx.rop.code.RegisterSpecSet
public final class RegisterSpecSet
Set of RegisterSpec instances, where a given register number
may appear only once in the set.
| Field Summary | |
|---|---|
static RegisterSpecSet |
EMPTY
non-null; no-element instance |
| Constructor Summary | |
|---|---|
RegisterSpecSet(int maxSize)
Constructs an instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
|
RegisterSpec |
findMatchingLocal(RegisterSpec spec)
Returns the spec in this set that's currently associated with a given local (type, name, and signature), or null if there is
none. |
RegisterSpec |
get(int reg)
Gets the element with the given register number, if any. |
RegisterSpec |
get(RegisterSpec spec)
Gets the element with the same register number as the given spec, if any. |
int |
getMaxSize()
Gets the maximum number of registers that may be in this instance, which is also the maximum-plus-one of register numbers that may be represented. |
int |
hashCode()
|
void |
intersect(RegisterSpecSet other,
boolean localPrimary)
Intersects this instance with the given one, modifying this instance. |
RegisterSpec |
localItemToSpec(LocalItem local)
Returns the spec in this set that's currently associated with a given local (name and signature), or null if there is none. |
RegisterSpecSet |
mutableCopy()
Makes and return a mutable copy of this instance. |
void |
put(RegisterSpec spec)
Puts the given spec into the set. |
void |
putAll(RegisterSpecSet set)
Put the entire contents of the given set into this one. |
void |
remove(RegisterSpec toRemove)
Removes a spec from the set. |
int |
size()
Gets the current size of this instance. |
String |
toString()
|
RegisterSpecSet |
withOffset(int delta)
Returns an instance that is identical to this one, except that all register numbers are offset by the given amount. |
| Methods inherited from class com.android.dx.util.MutabilityControl |
|---|
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final RegisterSpecSet EMPTY
non-null; no-element instance
| Constructor Detail |
|---|
public RegisterSpecSet(int maxSize)
maxSize - >= 0; the maximum register number (exclusive) that
may be represented in this instance| Method Detail |
|---|
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic int getMaxSize()
>= 0; the maximum sizepublic int size()
>= 0; the sizepublic RegisterSpec get(int reg)
reg - >= 0; the desired register number
null-ok; the element with the given register number or
null if there is nonepublic RegisterSpec get(RegisterSpec spec)
get(spec.getReg()).
spec - non-null; spec with the desired register number
null-ok; the element with the matching register number or
null if there is nonepublic RegisterSpec findMatchingLocal(RegisterSpec spec)
null if there is
none. This ignores the register number of the given spec but
matches on everything else.
spec - non-null; local to look for
null-ok; first register found that matches, if anypublic RegisterSpec localItemToSpec(LocalItem local)
null if there is none.
local - non-null; local item to search for
null-ok; first register found with matching name and signaturepublic void remove(RegisterSpec toRemove)
toRemove - non-null; register to remove.public void put(RegisterSpec spec)
spec - non-null; the register spec to put in the instancepublic void putAll(RegisterSpecSet set)
set - non-null; the set to put into this instance
public void intersect(RegisterSpecSet other,
boolean localPrimary)
RegisterSpec.intersect(com.android.dx.rop.code.RegisterSpec, boolean) of corresponding elements from
this instance and the given one where both are non-null.
other - non-null; set to intersect withlocalPrimary - whether local variables are primary to
the intersection; if true, then the only non-null
result elements occur when registers being intersected have
equal names (or both have null names)public RegisterSpecSet withOffset(int delta)
delta - the amount to offset the register numbers by
non-null; an appropriately-constructed instancepublic RegisterSpecSet mutableCopy()
non-null; the mutable copy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||