|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.cf.code.Frame
public final class Frame
Representation of a Java method execution frame. A frame consists of a set of locals and a value stack, and it can be told to act on them to load and store values between them and an "arguments / results" area.
| Constructor Summary | |
|---|---|
Frame(int maxLocals,
int maxStack)
Constructs an instance. |
|
| Method Summary | |
|---|---|
void |
annotate(com.android.dex.util.ExceptionWithContext ex)
Annotates (adds context to) the given exception with information about this frame. |
Frame |
copy()
Makes and returns a mutable copy of this instance. |
LocalsArray |
getLocals()
Gets the locals array for this instance. |
ExecutionStack |
getStack()
Gets the execution stack for this instance. |
IntList |
getSubroutines()
Returns the largest subroutine nesting this block may be in. |
void |
initializeWithParameters(StdTypeList params)
Initialize this frame with the method's parameters. |
Frame |
makeExceptionHandlerStartFrame(CstType exceptionClass)
Makes a new frame for an exception handler block invoked from this frame. |
void |
makeInitialized(Type type)
Replaces all the occurrences of the given uninitialized type in this frame with its initialized equivalent. |
Frame |
makeNewSubroutineStartFrame(int subLabel,
int callerLabel)
Makes a frame for a subroutine start block, given that this is the ending frame of one of the subroutine's calling blocks. |
Frame |
mergeWith(Frame other)
Merges two frames. |
Frame |
mergeWithSubroutineCaller(Frame other,
int subLabel,
int predLabel)
Merges this frame with the frame of a subroutine caller at predLabel. |
void |
setImmutable()
Makes this instance immutable. |
Frame |
subFrameForLabel(int startLabel,
int subLabel)
Returns a Frame instance representing the frame state that should be used when returning from a subroutine. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Frame(int maxLocals,
int maxStack)
nulls) and
the stack starts out empty.
maxLocals - >= 0; the maximum number of locals this instance
can refer tomaxStack - >= 0; the maximum size of the stack for this
instance| Method Detail |
|---|
public Frame copy()
non-null; the copypublic void setImmutable()
public void makeInitialized(Type type)
type - non-null; type to replacepublic LocalsArray getLocals()
non-null; the locals arraypublic ExecutionStack getStack()
non-null; the execution stackpublic IntList getSubroutines()
non-null; list as noted abovepublic void initializeWithParameters(StdTypeList params)
params - Type list of method parameters.
public Frame subFrameForLabel(int startLabel,
int subLabel)
startLabel - >=0; The label of the returning subroutine's
start blocksubLabel - >=0; A calling label of a subroutine
null-ok; an appropriatly-constructed instance, or null
if label is not in the setpublic Frame mergeWith(Frame other)
other - non-null; another frame
non-null; the result of merging the two frames
public Frame mergeWithSubroutineCaller(Frame other,
int subLabel,
int predLabel)
predLabel. Only called on the frame at the first
block of a subroutine.
other - non-null; another framesubLabel - label of subroutine start blockpredLabel - label of calling block
non-null; the result of merging the two frames
public Frame makeNewSubroutineStartFrame(int subLabel,
int callerLabel)
subLabel - label of subroutine start blockcallerLabel - >=0; label of the caller block where this frame
came from.
public Frame makeExceptionHandlerStartFrame(CstType exceptionClass)
exceptionClass - exception that the handler block will handle
public void annotate(com.android.dex.util.ExceptionWithContext ex)
ex - non-null; the exception to annotate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||