RegisterSpec instances, where a given register number
may appear only once in the set.
| Modifier and Type | Field and Description |
|---|---|
| public static final RegisterSpecSet | EMPTY
|
| private int | size
|
| private final RegisterSpec[] | specs
|
| Access | Constructor and Description |
|---|---|
| public | RegisterSpecSet(int
>= 0; the maximum register number (exclusive) that
may be represented in this instanceConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public RegisterSpec | Returns: null-ok; first register found that matches, if anynon-null; local to look forReturns the spec in this set that's currently associated with a
given local (type, name, and signature), or |
| public RegisterSpec | Returns: null-ok; the element with the given register number or
null if there is none>= 0; the desired register numberGets the element with the given register number, if any. |
| public RegisterSpec | Returns: null-ok; the element with the matching register number or
null if there is nonenon-null; spec with the desired register numberGets the element with the same register number as the given spec, if any. |
| public int | Returns: >= 0; the maximum sizeGets 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. |
| public int | |
| public void | intersect(RegisterSpecSet
non-null; set to intersect withwhether local variables are primary to
the intersection; if localPrimary)true, then the only non-null
result elements occur when registers being intersected have
equal names (or both have null names)Intersects this instance with the given one, modifying this instance. |
| public RegisterSpec | Returns: null-ok; first register found with matching name and signaturenon-null; local item to search forReturns the spec in this set that's currently associated with a given
local (name and signature), or |
| public RegisterSpecSet | |
| public void | put(RegisterSpec
non-null; the register spec to put in the instancePuts the given spec into the set. |
| public void | putAll(RegisterSpecSet
non-null; the set to put into this instancePut the entire contents of the given set into this one. |
| public void | |
| public int | |
| public String | |
| public RegisterSpecSet | Returns: non-null; an appropriately-constructed instancethe amount to offset the register numbers by delta)Returns an instance that is identical to this one, except that all register numbers are offset by the given amount. |
| EMPTY | back to summary |
|---|---|
| public static final RegisterSpecSet EMPTY
| |
| size | back to summary |
|---|---|
| private int size
| |
| specs | back to summary |
|---|---|
| private final RegisterSpec[] specs
| |
| RegisterSpecSet | back to summary |
|---|---|
| public RegisterSpecSet(int maxSize) Constructs an instance. The instance is initially empty.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| findMatchingLocal | back to summary |
|---|---|
| public RegisterSpec findMatchingLocal(RegisterSpec spec) Returns the spec in this set that's currently associated with a
given local (type, name, and signature), or
| |
| get | back to summary |
|---|---|
| public RegisterSpec get(int reg) Gets the element with the given register number, if any.
| |
| get | back to summary |
|---|---|
| public RegisterSpec get(RegisterSpec spec) Gets the element with the same register number as the given
spec, if any. This is just a convenient shorthand for
| |
| getMaxSize | back to summary |
|---|---|
| public 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.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| intersect | back to summary |
|---|---|
| public void intersect(RegisterSpecSet other, boolean localPrimary) Intersects this instance with the given one, modifying this
instance. The intersection consists of the pairwise
| |
| localItemToSpec | back to summary |
|---|---|
| public RegisterSpec localItemToSpec(LocalItem local) Returns the spec in this set that's currently associated with a given
local (name and signature), or
| |
| mutableCopy | back to summary |
|---|---|
| public RegisterSpecSet mutableCopy() Makes and return a mutable copy of this instance.
| |
| put | back to summary |
|---|---|
| public void put(RegisterSpec spec) Puts the given spec into the set. If there is already an element in the set with the same register number, it is replaced. Additionally, if the previous element is for a category-2 register, then that previous element is nullified. Finally, if the given spec is for a category-2 register, then the immediately subsequent element is nullified.
| |
| putAll | back to summary |
|---|---|
| public void putAll(RegisterSpecSet set) Put the entire contents of the given set into this one.
| |
| remove | back to summary |
|---|---|
| public void remove(RegisterSpec toRemove) Removes a spec from the set. Only the register number of the parameter is significant.
| |
| size | back to summary |
|---|---|
| public int size() Gets the current size of this instance.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| withOffset | back to summary |
|---|---|
| public RegisterSpecSet withOffset(int delta) Returns an instance that is identical to this one, except that all register numbers are offset by the given amount. Mutability of the result is inherited from the original.
| |