| Modifier and Type | Class and Description |
|---|---|
| public static enum | LocalList.
Disposition of a local entry. |
| public static class | LocalList.
Entry in a local list. |
| public static class | LocalList.
Intermediate state when constructing a local list. |
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | DEBUG
whether to run the self-check code |
| public static final LocalList | EMPTY
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | debugPrint(PrintStream
non-null; where to dumpnon-null; prefix to attach to each line of outputDoes a human-friendly dump of this instance. |
| private static void | debugVerify(LocalList locals)
Debugging helper that verifies the constraint that a list doesn't contain any redundant local starts and that local ends that are due to replacements are properly annotated. |
| private static void | |
| public LocalList. | Returns: non-null; element at that index>= 0, < size(); which indexGets the element at the given index. |
| public static LocalList | Returns: non-null; the constructed listnon-null; instructions to convertConstructs an instance for the given method, based on the given block order and intermediate local information. |
| public void |
| DEBUG | back to summary |
|---|---|
| private static final boolean DEBUG whether to run the self-check code | |
| EMPTY | back to summary |
|---|---|
| public static final LocalList EMPTY
| |
| LocalList | back to summary |
|---|---|
| public LocalList(int size) Constructs an instance. All indices initially contain
| |
| debugPrint | back to summary |
|---|---|
| public void debugPrint(PrintStream out, String prefix) Does a human-friendly dump of this instance.
| |
| debugVerify | back to summary |
|---|---|
| private static void debugVerify(LocalList locals) Debugging helper that verifies the constraint that a list doesn't contain any redundant local starts and that local ends that are due to replacements are properly annotated. | |
| debugVerify0 | back to summary |
|---|---|
| private static void debugVerify0(LocalList locals) Helper for | |
| get | back to summary |
|---|---|
| public LocalList. Gets the element at the given index. It is an error to call
this with the index for an element which was never set; if you
do that, this will throw | |
| make | back to summary |
|---|---|
| public static LocalList make(DalvInsnList insns) Constructs an instance for the given method, based on the given block order and intermediate local information.
| |
| set | back to summary |
|---|---|
| public void set(int n, LocalList. Sets the entry at the given index. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LocalList. | END_CLOBBERED_BY_NEXT
local ended because the next local clobbered this one (because this one is a category-2) |
| public static final LocalList. | END_CLOBBERED_BY_PREV
local ended because the previous local clobbered this one (because it is category-2) |
| public static final LocalList. | END_MOVED
local ended because it was moved to a different register |
| public static final LocalList. | END_REPLACED
local ended because it was directly replaced |
| public static final LocalList. | END_SIMPLY
local ended without being replaced |
| public static final LocalList. | START
local started (introduced) |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LocalList. | |
| public static LocalList. |
| END_CLOBBERED_BY_NEXT | back to summary |
|---|---|
| public static final LocalList. local ended because the next local clobbered this one (because this one is a category-2) | |
| END_CLOBBERED_BY_PREV | back to summary |
|---|---|
| public static final LocalList. local ended because the previous local clobbered this one (because it is category-2) | |
| END_MOVED | back to summary |
|---|---|
| public static final LocalList. local ended because it was moved to a different register | |
| END_REPLACED | back to summary |
|---|---|
| public static final LocalList. local ended because it was directly replaced | |
| END_SIMPLY | back to summary |
|---|---|
| public static final LocalList. local ended without being replaced | |
| START | back to summary |
|---|---|
| public static final LocalList. local started (introduced) | |
| Disposition | back to summary |
|---|---|
| private Disposition() | |
| valueOf | back to summary |
|---|---|
| public static LocalList. | |
| values | back to summary |
|---|---|
| public static LocalList. | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | address
|
| private final LocalList. | disposition
|
| private final RegisterSpec | spec
|
| private final CstType | type
|
| Access | Constructor and Description |
|---|---|
| public | Entry(int
>= 0; addressnon-null; disposition of the localnon-null; register spec representing
the variableConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: -1..1; standard result of comparisonnon-null; entry to compare toImplements java. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public int | |
| public LocalList. | |
| public CstString | |
| public int | Returns: >= 0; the number of the register holding
the variableGets the number of the register holding the variable. |
| public RegisterSpec | Returns: non-null; RegisterSpec of the holding register.Gets the RegisterSpec of the register holding the variable. |
| public CstString | |
| public CstType | |
| public boolean | |
| public boolean | Returns: true iff this instance matches
specnon-null; the spec in questionReturns whether or not this instance matches the given spec. |
| public boolean | |
| public String | |
| public LocalList. | Returns: non-null; an appropriately-constructed instancenon-null; the new dispositionReturns an instance just like this one but with the disposition set as given. |
| address | back to summary |
|---|---|
| private final int address
| |
| disposition | back to summary |
|---|---|
| private final LocalList.
| |
| spec | back to summary |
|---|---|
| private final RegisterSpec spec
| |
| type | back to summary |
|---|---|
| private final CstType type
| |
| Entry | back to summary |
|---|---|
| public Entry(int address, LocalList. Constructs an instance.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(LocalList. Implements java. Compares by (in priority order) address, end then start disposition (variants of end are all consistered equivalent), and spec. | |
| 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.
| |
| getAddress | back to summary |
|---|---|
| public int getAddress() Gets the address.
| |
| getDisposition | back to summary |
|---|---|
| public LocalList. Gets the disposition.
| |
| getName | back to summary |
|---|---|
| public CstString getName() Gets the variable name.
| |
| getRegister | back to summary |
|---|---|
| public int getRegister() Gets the number of the register holding the variable.
| |
| getRegisterSpec | back to summary |
|---|---|
| public RegisterSpec getRegisterSpec() Gets the RegisterSpec of the register holding the variable.
| |
| getSignature | back to summary |
|---|---|
| public CstString getSignature() Gets the variable signature.
| |
| getType | back to summary |
|---|---|
| public CstType getType() Gets the variable's type.
| |
| isStart | back to summary |
|---|---|
| public boolean isStart() Gets whether this is a local start. This is just shorthand for
| |
| matches | back to summary |
|---|---|
| public boolean matches(RegisterSpec otherSpec) Returns whether or not this instance matches the given spec.
| |
| matches | back to summary |
|---|---|
| public boolean matches(LocalList. Returns whether or not this instance matches the spec in the given instance. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| withDisposition | back to summary |
|---|---|
| public LocalList. Returns an instance just like this one but with the disposition set as given.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int[] | endIndices
|
| private int | lastAddress
|
| private int | nullResultCount
|
| private RegisterSpecSet | regs
|
| private final ArrayList | result
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | aboutToProcess(int
>= 0; address about to be processed>= 0; register number about to be processedChecks the address and other vitals as a prerequisite to further processing. |
| private void | add(int
>= 0; the addressnon-null; the dispositionnon-null; spec representing the localAdds an entry to the result, updating the adjunct tables accordingly. |
| private void | addOrUpdateEnd(int
>= 0; the addressnon-null; the dispositionnon-null; spec representing the localAdds or updates an end local (changing its disposition). |
| private boolean | Returns: true iff this method found the case in question
and adjusted things accordingly>= 0; the addressnon-null; spec representing the
local being endedHelper for |
| public void | endLocal(int
>= 0; the addressnon-null; spec representing the
local being endedEnds a local at the given address, using the disposition
|
| public void | endLocal(int
>= 0; the addressnon-null; spec representing the
local being endedreason for the end dispositionEnds a local at the given address. |
| private static RegisterSpec | Returns: null-ok; an appropriately modified spec, or the
original if nothing needs to be donenull-ok; the original specConverts a given spec into the form acceptable for use in a local list. |
| public LocalList | |
| public void | snapshot(int
>= 0; the addressnon-null; spec set representing the localsSets the local state at the given address to the given snapshot. |
| public void | startLocal(int
>= 0; the addressnon-null; spec representing the
started localStarts a local at the given address. |
| endIndices | back to summary |
|---|---|
| private int[] endIndices
| |
| lastAddress | back to summary |
|---|---|
| private int lastAddress
| |
| nullResultCount | back to summary |
|---|---|
| private int nullResultCount
| |
| regs | back to summary |
|---|---|
| private RegisterSpecSet regs
| |
| result | back to summary |
|---|---|
| private final ArrayList<LocalList.
| |
| MakeState | back to summary |
|---|---|
| public MakeState(int initialSize) Constructs an instance. | |
| aboutToProcess | back to summary |
|---|---|
| private void aboutToProcess(int address, int reg) Checks the address and other vitals as a prerequisite to further processing.
| |
| add | back to summary |
|---|---|
| private void add(int address, LocalList. Adds an entry to the result, updating the adjunct tables accordingly.
| |
| addOrUpdateEnd | back to summary |
|---|---|
| private void addOrUpdateEnd(int address, LocalList. Adds or updates an end local (changing its disposition). If this would cause an empty range for a local, this instead removes the local entirely.
| |
| checkForEmptyRange | back to summary |
|---|---|
| private boolean checkForEmptyRange(int address, RegisterSpec endedLocal) Helper for
| |
| endLocal | back to summary |
|---|---|
| public void endLocal(int address, RegisterSpec endedLocal) Ends a local at the given address, using the disposition
| |
| endLocal | back to summary |
|---|---|
| public void endLocal(int address, RegisterSpec endedLocal, LocalList. Ends a local at the given address.
| |
| filterSpec | back to summary |
|---|---|
| private static RegisterSpec filterSpec(RegisterSpec orig) Converts a given spec into the form acceptable for use in a
local list. This, in particular, transforms the "known
null" type into simply This isn't necessarily the cleanest way to achieve the goal of not representing known nulls in a locals list, but it gets the job done.
| |
| finish | back to summary |
|---|---|
| public LocalList finish() Finishes processing altogether and gets the result.
| |
| snapshot | back to summary |
|---|---|
| public void snapshot(int address, RegisterSpecSet specs) Sets the local state at the given address to the given snapshot. The first call on this instance must be to this method, so that the register state can be properly sized.
| |
| startLocal | back to summary |
|---|---|
| public void startLocal(int address, RegisterSpec startedLocal) Starts a local at the given address.
| |