public final class JsrScope extends Object
Bytecodes.JSR and exited via Bytecodes.RET.| Modifier and Type | Field and Description |
|---|---|
static JsrScope |
EMPTY_SCOPE
The scope outside of any JSR/RET subroutine.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAncestry()
Gets the ancestry of this scope starting with the
JsrScope.returnAddress of this scope's most
distant ancestor and ending with the JsrScope.returnAddress of this object. |
BciBlockMapping.BciBlock |
getJsrEntryBlock() |
int |
hashCode() |
boolean |
isEmpty()
Determines if this is the scope outside of any JSR/RET subroutine.
|
boolean |
isPrefixOf(JsrScope other)
Determines if the ancestry of this scope is a prefix of the
ancestry of
other. |
int |
nextReturnAddress() |
JsrScope |
pop()
Gets this scope's parent.
|
JsrScope |
push(int returnBci) |
JsrScope |
push(int returnBci,
BciBlockMapping.BciBlock newJsrEntryBlock)
Enters a new subroutine from the current scope represented by this object.
|
String |
toString() |
public static final JsrScope EMPTY_SCOPE
public int nextReturnAddress()
public BciBlockMapping.BciBlock getJsrEntryBlock()
public JsrScope push(int returnBci, BciBlockMapping.BciBlock newJsrEntryBlock)
returnBci - the bytecode address returned to when leaving the new scopepublic JsrScope push(int returnBci)
public boolean isEmpty()
public String getAncestry()
JsrScope.returnAddress of this scope's most
distant ancestor and ending with the JsrScope.returnAddress of this object.int[] with value.chars().toArray().public boolean isPrefixOf(JsrScope other)
other.public JsrScope pop()
JsrScope.EMPTY_SCOPE if this is the JsrScope.EMPTY_SCOPE