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 AbstractAndroidModel
body, entryPoints, insts, paramManagerModifier and TypeFieldDescriptionprotected VolatileMethodSummaryprotected Iterable<? extends Entrypoint> protected TypeSafeInstructionFactoryprotected SSAValueManager -
Constructor Summary
ConstructorsConstructorDescriptionLoopKillAndroidModel(VolatileMethodSummary body, TypeSafeInstructionFactory insts, SSAValueManager paramManager, Iterable<? extends Entrypoint> entryPoints) -
Method Summary
Modifier and TypeMethodDescriptionprotected intenterAT_FIRST(int PC) Loop starts here.protected intleaveAT_LAST(int PC) Loops to AT_FIRST.Methods inherited from class LoopAndroidModel
enterAFTER_LOOP, enterSTART_OF_LOOPModifier and TypeMethodDescriptionprotected intenterAFTER_LOOP(int PC) Loops to START_OF_LOOP.protected intenterSTART_OF_LOOP(int PC) Prepares the PC to get looped to.Methods inherited from class SingleStartAndroidModel
enterEND_OF_LOOP, enterMULTIPLE_TIMES_IN_LOOPModifier and TypeMethodDescriptionprotected intenterEND_OF_LOOP(int PC) Loops to MULTIPLE_TIMES_IN_LOOP.protected intenterMULTIPLE_TIMES_IN_LOOP(int PC) Prepares the PC to get looped to.Methods inherited from class AbstractAndroidModel
enter, enterAT_LAST, enterBEFORE_LOOP, enterMIDDLE_OF_LOOP, finish, hadSectionSwitch, returnTypesBetweenModifier and TypeMethodDescriptionintenter(AndroidEntryPoint.ExecutionOrder section, int PC) Dispatches to the enterLABEL-functions.protected intenterAT_LAST(int PC) Gets called when Label ExecutionOrder.AT_LAST got stepped over.protected intenterBEFORE_LOOP(int PC) Gets called when Label ExecutionOrder.BEFORE_LOOP got stepped over.protected intenterMIDDLE_OF_LOOP(int PC) Gets called when Label ExecutionOrder.MIDDLE_OF_LOOP got stepped over.intfinish(int PC) Calls all remaining enterLABEL-functions, finally calls leaveAT_LAST.final booleanDetermines for an AndroidEntryPoint if a label got skipped over.protected List<TypeReference> Return a List of all Types returned by functions between start (inclusive) and end (exclusive).
-
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.Side effects: currentSection is updated, instructions are inserted into the body
- Overrides:
enterAT_FIRSTin 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)insteadSide effects: instructions are inserted into the body
- Overrides:
leaveAT_LASTin 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
-