| Modifier and Type | Class and Description |
|---|---|
| private static class | RegisterSpec.
Holder of register spec data for the purposes of comparison (so that
|
| Modifier and Type | Field and Description |
|---|---|
| private final LocalItem | local
|
| public static final String | PREFIX
|
| private final int | reg
|
| private static final RegisterSpec. | theInterningItem
|
| private static final HashMap | theInterns
|
| private final TypeBearer | type
|
| Access | Constructor and Description |
|---|---|
| private | RegisterSpec(int
>= 0; the register numbernon-null; the type (or possibly actual value) which
is loaded from or stored to the indicated registernull-ok; the associated local variable, if anyConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: -1..1; standard result of comparisonnon-null; spec to compare toImplements java. TypeBearers, and local info.
|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| private boolean | Returns: whether this instance is equal to one with the given valuesvalue of the instance variable, for another instance reg, TypeBearer value of the instance variable, for another instance type, LocalItem value of the instance variable, for another instance local)Helper for |
| public boolean | Returns: true iff this and other are equal
in the stated waynull-ok; spec to compare toLike |
| public final int | getBasicFrameType()
Implements org. |
| public final int | getBasicType()
Implements org. |
| public int | Returns: 1..2; the category of this instance's typeGets the category of this instance's type. |
| public TypeBearer | getFrameType()
Implements org. |
| public LocalItem | Returns: null-ok; the variable info, or null if this
instance has noneGets the variable info associated with this instance, if any. |
| public int | Returns: >= 0; the required registers sizeGets the next available register number after the one in this instance. |
| public int | |
| public Type | getType()
Implements org. |
| public TypeBearer | Returns: non-null; the typeGets the type (or actual value) which is loaded from or stored to the register associated with this instance. |
| public int | |
| private static int | Returns: the hash codevalue of the instance variable reg, TypeBearer value of the instance variable type, LocalItem value of the instance variable local)Helper for |
| private static RegisterSpec | Returns: non-null; an appropriately-constructed instance>= 0; the register numbernon-null; the type (or possibly actual value) which
is loaded from or stored to the indicated registernull-ok; the associated local variable, if anyIntern the given triple as an instance of this class. |
| public RegisterSpec | Returns: null-ok; the intersectionnull-ok; instance to intersect with (or null)whether local variables are primary to the
intersection; if localPrimary)true, then the only non-null
results occur when registers being intersected have equal local
infos (or both have null local infos)Returns an instance that is the intersection between this instance and the given one, if any. |
| public boolean | Returns: whether or not this instance's type is of category 1Gets whether this instance's type is category 1. |
| public boolean | Returns: whether or not this instance's type is of category 2Gets whether this instance's type is category 2. |
| public final boolean | isConstant()
Implements org. |
| public static RegisterSpec | Returns: non-null; an appropriately-constructed instance>= 0; the register numbernon-null; the type (or possibly actual value) which
is loaded from or stored to the indicated registerReturns an instance for the given register number and type, with no variable info. |
| public static RegisterSpec | Returns: non-null; an appropriately-constructed instance>= 0; the register numbernon-null; the type (or possibly actual value) which
is loaded from or stored to the indicated registernon-null; the associated local variableReturns an instance for the given register number, type, and variable info. |
| public static RegisterSpec | Returns: non-null; an appropriately-constructed instance>= 0; the register numbernon-null; the type (or possibly actual value) which
is loaded from or stored to the indicated registernull-ok; the associated variable info or null for
noneReturns an instance for the given register number, type, and variable info. |
| public boolean | Returns: true iff this and other are equal
in the stated waynull-ok; spec to compare toLike |
| public static String | Returns: non-null; the string form>= 0; the register numberGets the string form for the given register number. |
| public String | Returns: non-null; the register string formGets the string form for just the register number of this instance. |
| public String | toHuman()
Implements org. |
| public String | |
| private String | |
| public RegisterSpec | Returns: an appropriate instancenull-ok; the local item or null for noneReturns an instance that is identical to this one except that the local variable is as specified in the parameter. |
| public RegisterSpec | Returns: non-null; an appropriately-constructed instancethe amount to offset the register number by delta)Returns an instance that is identical to this one, except that the register number is offset by the given amount. |
| public RegisterSpec | Returns: non-null; an appropriately-constructed instance>= 0; the new register numberReturns an instance that is identical to this one, except that the register number is replaced by the given one. |
| public RegisterSpec | Returns: non-null; an appropriately-constructed instanceReturns an instance that is identical to this one, except that the type bearer is replaced by the actual underlying type (thereby stripping off non-type information) with any initialization information stripped away as well. |
| public RegisterSpec | Returns: non-null; an appropriately-constructed instancenon-null; the new typeReturns an instance that is identical to this one, except that the type is replaced by the given one. |
| local | back to summary |
|---|---|
| private final LocalItem local
| |
| PREFIX | back to summary |
|---|---|
| public static final String PREFIX
| |
| reg | back to summary |
|---|---|
| private final int reg
| |
| theInterningItem | back to summary |
|---|---|
| private static final RegisterSpec.
| |
| theInterns | back to summary |
|---|---|
| private static final HashMap<Object, RegisterSpec> theInterns
| |
| type | back to summary |
|---|---|
| private final TypeBearer type
| |
| RegisterSpec | back to summary |
|---|---|
| private RegisterSpec(int reg, TypeBearer type, LocalItem local) Constructs an instance. This constructor is private. Use
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(RegisterSpec other) Implements java. Compares by (in priority order) register number, unwrapped type
(that is types not
| |
| 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. | |
| equals | back to summary |
|---|---|
| private boolean equals(int reg, TypeBearer type, LocalItem local) Helper for
| |
| equalsUsingSimpleType | back to summary |
|---|---|
| public boolean equalsUsingSimpleType(RegisterSpec other) Like
| |
| getBasicFrameType | back to summary |
|---|---|
| public final int getBasicFrameType() Implements org. Doc from org. Gets the basic type corresponding to this instance's frame type. This
is equivalent to
| |
| getBasicType | back to summary |
|---|---|
| public final int getBasicType() Implements org. Doc from org. Gets the basic type corresponding to this instance.
| |
| getCategory | back to summary |
|---|---|
| public int getCategory() Gets the category of this instance's type. This is just a convenient
shorthand for
| |
| getFrameType | back to summary |
|---|---|
| public TypeBearer getFrameType() Implements org. Doc from org. Gets the frame type corresponding to this type. This method returns
| |
| getLocalItem | back to summary |
|---|---|
| public LocalItem getLocalItem() Gets the variable info associated with this instance, if any.
| |
| getNextReg | back to summary |
|---|---|
| public int getNextReg() Gets the next available register number after the one in this instance. This is equal to the register number plus the width (category) of the type used. Among other things, this may also be used to determine the minimum required register count implied by this instance.
| |
| getReg | back to summary |
|---|---|
| public int getReg() Gets the register number.
| |
| getType | back to summary |
|---|---|
| public Type getType() Implements org. Doc from org. Gets the type associated with this instance.
| |
| getTypeBearer | back to summary |
|---|---|
| public TypeBearer getTypeBearer() Gets the type (or actual value) which is loaded from or stored to the register associated with this instance.
| |
| 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
| |
| hashCodeOf | back to summary |
|---|---|
| private static int hashCodeOf(int reg, TypeBearer type, LocalItem local) Helper for
| |
| intern | back to summary |
|---|---|
| private static RegisterSpec intern(int reg, TypeBearer type, LocalItem local) Intern the given triple as an instance of this class.
| |
| intersect | back to summary |
|---|---|
| public RegisterSpec intersect(RegisterSpec other, boolean localPrimary) Returns an instance that is the intersection between this instance and the given one, if any. The intersection is defined as follows:
| |
| isCategory1 | back to summary |
|---|---|
| public boolean isCategory1() Gets whether this instance's type is category 1. This is just a
convenient shorthand for
| |
| isCategory2 | back to summary |
|---|---|
| public boolean isCategory2() Gets whether this instance's type is category 2. This is just a
convenient shorthand for
| |
| isConstant | back to summary |
|---|---|
| public final boolean isConstant() Implements org. Doc from org. Returns whether this instance represents a constant value.
| |
| make | back to summary |
|---|---|
| public static RegisterSpec make(int reg, TypeBearer type) Returns an instance for the given register number and type, with no variable info. This method is allowed to return shared instances (but doesn't necessarily do so).
| |
| make | back to summary |
|---|---|
| public static RegisterSpec make(int reg, TypeBearer type, LocalItem local) Returns an instance for the given register number, type, and variable info. This method is allowed to return shared instances (but doesn't necessarily do so).
| |
| makeLocalOptional | back to summary |
|---|---|
| public static RegisterSpec makeLocalOptional(int reg, TypeBearer type, LocalItem local) Returns an instance for the given register number, type, and variable info. This method is allowed to return shared instances (but doesn't necessarily do so).
| |
| matchesVariable | back to summary |
|---|---|
| public boolean matchesVariable(RegisterSpec other) Like
| |
| regString | back to summary |
|---|---|
| public static String regString(int reg) Gets the string form for the given register number.
| |
| regString | back to summary |
|---|---|
| public String regString() Gets the string form for just the register number of this instance.
| |
| toHuman | back to summary |
|---|---|
| public String toHuman() Implements org. Doc from org. Return the "human" string form of this instance. This is
generally less "debuggy" than
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| toString0 | back to summary |
|---|---|
| private String toString0(boolean human) Helper for
| |
| withLocalItem | back to summary |
|---|---|
| public RegisterSpec withLocalItem(LocalItem local) Returns an instance that is identical to this one except that the local variable is as specified in the parameter.
| |
| withOffset | back to summary |
|---|---|
| public RegisterSpec withOffset(int delta) Returns an instance that is identical to this one, except that the register number is offset by the given amount.
| |
| withReg | back to summary |
|---|---|
| public RegisterSpec withReg(int newReg) Returns an instance that is identical to this one, except that the register number is replaced by the given one.
| |
| withSimpleType | back to summary |
|---|---|
| public RegisterSpec withSimpleType() Returns an instance that is identical to this one, except that the type bearer is replaced by the actual underlying type (thereby stripping off non-type information) with any initialization information stripped away as well.
| |
| withType | back to summary |
|---|---|
| public RegisterSpec withType(TypeBearer newType) Returns an instance that is identical to this one, except that the type is replaced by the given one.
| |
RegisterSpec itself can still keep final
instance variables.
| Modifier and Type | Field and Description |
|---|---|
| private LocalItem | local
|
| private int | reg
|
| private TypeBearer | type
|
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public int | |
| public void | Returns: non-null; an appropriately-constructed instance>= 0; the register numbernon-null; the type (or possibly actual
value) which is loaded from or stored to the indicated
registernull-ok; the associated local variable, if anySet all the instance variables. |
| public RegisterSpec | Returns: non-null; an appropriately-constructed instanceConstruct a |
| local | back to summary |
|---|---|
| private LocalItem local
| |
| reg | back to summary |
|---|---|
| private int reg
| |
| type | back to summary |
|---|---|
| private TypeBearer type
| |
| ForComparison | back to summary |
|---|---|
| private ForComparison() | |
| 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. | |
| 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
| |
| set | back to summary |
|---|---|
| public void set(int reg, TypeBearer type, LocalItem local) Set all the instance variables.
| |
| toRegisterSpec | back to summary |
|---|---|
| public RegisterSpec toRegisterSpec() Construct a
| |