|
||||||||||
| 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.util.FixedSizeList
com.android.dx.rop.code.RegisterSpecList
public final class RegisterSpecList
List of RegisterSpec instances.
| Field Summary | |
|---|---|
static RegisterSpecList |
EMPTY
non-null; no-element instance |
| Constructor Summary | |
|---|---|
RegisterSpecList(int size)
Constructs an instance. |
|
| Method Summary | |
|---|---|
RegisterSpec |
get(int n)
Gets the indicated element. |
int |
getRegistersSize()
Gets the minimum required register count implied by this instance. |
Type |
getType(int n)
Gets the indicated element. |
int |
getWordCount()
Gets the number of 32-bit words required to hold instances of all the elements of this list. |
int |
indexOfRegister(int reg)
Returns the index of a RegisterSpec in this list that uses the specified register, or -1 if none in this list uses the register. |
static RegisterSpecList |
make(RegisterSpec spec)
Makes a single-element instance. |
static RegisterSpecList |
make(RegisterSpec spec0,
RegisterSpec spec1)
Makes a two-element instance. |
static RegisterSpecList |
make(RegisterSpec spec0,
RegisterSpec spec1,
RegisterSpec spec2)
Makes a three-element instance. |
static RegisterSpecList |
make(RegisterSpec spec0,
RegisterSpec spec1,
RegisterSpec spec2,
RegisterSpec spec3)
Makes a four-element instance. |
void |
set(int n,
RegisterSpec spec)
Sets the element at the given index. |
RegisterSpec |
specForRegister(int reg)
Returns a RegisterSpec in this list that uses the specified register, or null if there is none in this list. |
RegisterSpecList |
subset(BitSet exclusionSet)
Returns a new instance, which contains a subset of the elements specified by the given BitSet. |
TypeList |
withAddedType(Type type)
Returns a new instance which is identical to this one, except that the given item is appended to the end and it is guaranteed to be immutable. |
RegisterSpecList |
withExpandedRegisters(int base,
boolean duplicateFirst,
BitSet compatRegs)
Returns an instance that is identical to this one, except that all incompatible register numbers are renumbered sequentially from the given base, with the first number duplicated if indicated. |
RegisterSpecList |
withFirst(RegisterSpec spec)
Returns a new instance, which is the same as this instance, except that it has an additional element prepended to the original. |
RegisterSpecList |
withOffset(int delta)
Returns an instance that is identical to this one, except that all register numbers are offset by the given amount. |
RegisterSpecList |
withoutFirst()
Returns a new instance, which is the same as this instance, except that its first element is removed. |
RegisterSpecList |
withoutLast()
Returns a new instance, which is the same as this instance, except that its last element is removed. |
| Methods inherited from class com.android.dx.util.FixedSizeList |
|---|
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, size, toHuman, toHuman, toString, toString |
| 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 |
| Methods inherited from interface com.android.dx.rop.type.TypeList |
|---|
isMutable, size |
| Field Detail |
|---|
public static final RegisterSpecList EMPTY
non-null; no-element instance
| Constructor Detail |
|---|
public RegisterSpecList(int size)
null.
size - the size of the list| Method Detail |
|---|
public static RegisterSpecList make(RegisterSpec spec)
spec - non-null; the element
non-null; an appropriately-constructed instance
public static RegisterSpecList make(RegisterSpec spec0,
RegisterSpec spec1)
spec0 - non-null; the first elementspec1 - non-null; the second element
non-null; an appropriately-constructed instance
public static RegisterSpecList make(RegisterSpec spec0,
RegisterSpec spec1,
RegisterSpec spec2)
spec0 - non-null; the first elementspec1 - non-null; the second elementspec2 - non-null; the third element
non-null; an appropriately-constructed instance
public static RegisterSpecList make(RegisterSpec spec0,
RegisterSpec spec1,
RegisterSpec spec2,
RegisterSpec spec3)
spec0 - non-null; the first elementspec1 - non-null; the second elementspec2 - non-null; the third elementspec3 - non-null; the fourth element
non-null; an appropriately-constructed instancepublic Type getType(int n)
NullPointerException.
getType in interface TypeListn - >= 0, < size(); which element
non-null; the indicated elementpublic int getWordCount()
getWordCount in interface TypeList>= 0; the required number of wordspublic TypeList withAddedType(Type type)
withAddedType in interface TypeListtype - non-null; item to append
non-null; an appropriately-constructed instancepublic RegisterSpec get(int n)
NullPointerException.
n - >= 0, < size(); which element
non-null; the indicated elementpublic RegisterSpec specForRegister(int reg)
reg - Register to find
public int indexOfRegister(int reg)
reg - Register to find
public void set(int n,
RegisterSpec spec)
n - >= 0, < size(); which elementspec - non-null; the value to storepublic int getRegistersSize()
>= 0; the required registers sizepublic RegisterSpecList withFirst(RegisterSpec spec)
spec - non-null; the new first spec (to prepend)
non-null; an appropriately-constructed instancepublic RegisterSpecList withoutFirst()
non-null; an appropriately-constructed instancepublic RegisterSpecList withoutLast()
non-null; an appropriately-constructed instancepublic RegisterSpecList subset(BitSet exclusionSet)
exclusionSet - non-null; set of registers to exclude
non-null; an appropriately-constructed instancepublic RegisterSpecList withOffset(int delta)
delta - the amount to offset the register numbers by
non-null; an appropriately-constructed instance
public RegisterSpecList withExpandedRegisters(int base,
boolean duplicateFirst,
BitSet compatRegs)
base - the base register numberduplicateFirst - whether to duplicate the first numbercompatRegs - null-ok; either a non-null set of
compatible registers, or null to indicate all registers are
compatible
non-null; an appropriately-constructed instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||