#include <command.h>
Public Member Functions | |
CFGCommand (Resources::Command *resource) | |
bool | isEntryPoint () const |
bool | isBranch () const |
bool | isBranchTarget () const |
CFGCommand * | getFollower () const |
CFGCommand * | getTrueBranch () const |
CFGCommand * | getFalseBranch () const |
Block * | getBlock () const |
void | setBlock (Block *block) |
void | linkBranches (const Common::Array< CFGCommand *> &commands) |
Public Member Functions inherited from Stark::Tools::Command | |
Command (Command *command) | |
Command (Resources::Command *resource) | |
void | printCall () const |
uint16 | getIndex () const |
Resources::Command::SubType | getSubType () const |
bool | hasSubtypeDescription () const |
ArgumentArray | getEffectiveArguments () const |
Protected Member Functions | |
void | initBranches () |
Protected Member Functions inherited from Stark::Tools::Command | |
Common::String | describeArguments (DefinitionRegistry *definitions) const |
Static Protected Member Functions | |
static CFGCommand * | findCommandWithIndex (const Common::Array< CFGCommand *> &commands, int32 index) |
Static Protected Member Functions inherited from Stark::Tools::Command | |
static const SubTypeDesc * | searchSubTypeDesc (Resources::Command::SubType subType) |
Protected Attributes | |
int32 | _followerIndex |
int32 | _trueBranchIndex |
int32 | _falseBranchIndex |
CFGCommand * | _follower |
CFGCommand * | _trueBranch |
CFGCommand * | _falseBranch |
Common::Array< CFGCommand * > | _predecessors |
Block * | _block |
Protected Attributes inherited from Stark::Tools::Command | |
uint16 | _index |
Resources::Command::SubType | _subType |
const SubTypeDesc * | _subTypeDesc |
ArgumentArray | _arguments |
Additional Inherited Members | |
Public Types inherited from Stark::Tools::Command | |
enum | ControlFlowType { kFlowNormal, kFlowBranch, kFlowEnd } |
typedef Common::Array< Resources::Command::Argument > | ArgumentArray |
A script command with control flow information
This class is a node in the disassembly command control flow graph. It is referenced by the blocks in the block control flow graph.
bool Stark::Tools::CFGCommand::isEntryPoint | ( | ) | const |
Is this command an entry point for the whole script?
bool Stark::Tools::CFGCommand::isBranch | ( | ) | const |
Can this command influence the control flow?
bool Stark::Tools::CFGCommand::isBranchTarget | ( | ) | const |
Is this command a jump target?
CFGCommand* Stark::Tools::CFGCommand::getFollower | ( | ) | const |
Commands are linked together in the command graph with these relationships:
Block* Stark::Tools::CFGCommand::getBlock | ( | ) | const |
Commands are aggregated into blocks
void Stark::Tools::CFGCommand::linkBranches | ( | const Common::Array< CFGCommand *> & | commands | ) |
Add the command to the command graph
This sets the graph edges concerning this command.
|
protected |
Set the link indices from the argument values
|
staticprotected |
Gets the command with the specifed index