Class LoopKillAndroidModel
This variant adds a nother loop to the LoopAndroidModel. This additional loop emulates the start of an Application with a savedIstanceState:
When memory on a device gets short Apps may be removed from memory. When they are needed again they get started using that savedIstanceState.
- Author:
- Tobias Blaschke <code@tobiasblaschke.de>
- See Also:
-
Field Summary
Fields inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.AbstractAndroidModel
body, entryPoints, insts, paramManager
-
Constructor Summary
ConstructorDescriptionLoopKillAndroidModel
(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
enterAT_FIRST
(int PC) Loop starts here.protected int
leaveAT_LAST
(int PC) Loops to AT_FIRST.Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.LoopAndroidModel
enterAFTER_LOOP, enterSTART_OF_LOOP
Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.SingleStartAndroidModel
enterEND_OF_LOOP, enterMULTIPLE_TIMES_IN_LOOP
Methods inherited from class com.ibm.wala.dalvik.ipa.callgraph.androidModel.structure.AbstractAndroidModel
enter, enterAT_LAST, enterBEFORE_LOOP, enterMIDDLE_OF_LOOP, finish, hadSectionSwitch, returnTypesBetween
-
Constructor Details
-
LoopKillAndroidModel
public LoopKillAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) - Parameters:
body
- The MethodSummary to add instructions toinsts
- Will be used to generate the instructions
-
-
Method Details
-
enterAT_FIRST
protected int enterAT_FIRST(int PC) Loop starts here.Gets called when Label ExecutionOrder.AT_FIRST got stepped over.
In most cases you don't want to invoke this function directly but to use
enter(ExecutionOrder.AT_FIRST, int)
instead.Sideeffects: currentSection is updated, instructions are inserted into the body
- Overrides:
enterAT_FIRST
in classAbstractAndroidModel
- Parameters:
PC
- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-
leaveAT_LAST
protected int leaveAT_LAST(int PC) Loops to AT_FIRST.It inserts a gotoInstruction and fills the space reserved before with actual PhiInstructions
Does not insert any special handling.
Gets called when the model gets finished.
In most cases you don't want to invoke this function directly but to use
AbstractAndroidModel.finish(int)
insteadSideeffects: instructions are inserted into the body
- Overrides:
leaveAT_LAST
in classLoopAndroidModel
- Parameters:
PC
- Program Counter instructions shall be placed at. In most cases you'll simply pass body.getNextProgramCounter()- Returns:
- Program Counter after insertion of the code
-