ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Stark::Tools::Decompiler Class Reference

#include <decompiler.h>

Collaboration diagram for Stark::Tools::Decompiler:

List of all members.

Public Member Functions

 Decompiler (Resources::Script *script)
 ~Decompiler ()
void printCommands () const
void printBlocks () const
void printDecompiled ()
Common::String getError () const

Private Member Functions

bool checkCommands ()
void linkCommandBranches ()
CFGCommandfindEntryPoint ()
void buildBlocks ()
void buildBlocks (Block *block, CFGCommand *command)
BlockbuildBranchBlocks (CFGCommand *command)
void analyseControlFlow ()
void detectInfiniteLoop ()
void detectWhile ()
void detectIf ()
ASTNodebuildAST ()
void buildASTFromBlock (ASTBlock *parent, Block *block, Block *stopBlock)
ASTConditionbuildASTConditionFromBlock (ASTNode *parent, Block *block)
ASTLoopbuildASTLoopFromBlock (ASTNode *parent, Block *block)
void verifyAST ()
bool verifyCommandInAST (CFGCommand *cfgCommand)
bool verifyCommandSuccessorInAST (CFGCommand *cfgCommand, CFGCommand *cfgSuccessor, ASTNode *astSuccessor, const char *successorType)

Private Attributes

Common::String _error
Common::Array< CFGCommand * > _commands
CFGCommand_entryPoint
Common::Array< Block * > _blocks
Common::Array< ControlStructure * > _controlStructures
ASTNode_astHead
Common::Array< Block * > _visitedInfiniteLoopStarts
Common::Array< Block * > _visitedBlocks
DefinitionRegistry_definitionRegistry

Detailed Description

Definition at line 47 of file decompiler.h.


Constructor & Destructor Documentation

Stark::Tools::Decompiler::Decompiler ( Resources::Script script  ) 

Definition at line 35 of file decompiler.cpp.

Stark::Tools::Decompiler::~Decompiler (  ) 

Definition at line 83 of file decompiler.cpp.


Member Function Documentation

void Stark::Tools::Decompiler::analyseControlFlow (  )  [private]

Definition at line 166 of file decompiler.cpp.

ASTNode * Stark::Tools::Decompiler::buildAST (  )  [private]

Definition at line 277 of file decompiler.cpp.

ASTCondition * Stark::Tools::Decompiler::buildASTConditionFromBlock ( ASTNode parent,
Block block 
) [private]

Definition at line 349 of file decompiler.cpp.

void Stark::Tools::Decompiler::buildASTFromBlock ( ASTBlock parent,
Block block,
Block stopBlock 
) [private]

Definition at line 285 of file decompiler.cpp.

ASTLoop * Stark::Tools::Decompiler::buildASTLoopFromBlock ( ASTNode parent,
Block block 
) [private]

Definition at line 367 of file decompiler.cpp.

void Stark::Tools::Decompiler::buildBlocks (  )  [private]

Definition at line 116 of file decompiler.cpp.

void Stark::Tools::Decompiler::buildBlocks ( Block block,
CFGCommand command 
) [private]

Definition at line 123 of file decompiler.cpp.

Block * Stark::Tools::Decompiler::buildBranchBlocks ( CFGCommand command  )  [private]

Definition at line 152 of file decompiler.cpp.

bool Stark::Tools::Decompiler::checkCommands (  )  [private]

Definition at line 261 of file decompiler.cpp.

void Stark::Tools::Decompiler::detectIf (  )  [private]

Definition at line 228 of file decompiler.cpp.

void Stark::Tools::Decompiler::detectInfiniteLoop (  )  [private]

Definition at line 172 of file decompiler.cpp.

void Stark::Tools::Decompiler::detectWhile (  )  [private]

Definition at line 194 of file decompiler.cpp.

CFGCommand * Stark::Tools::Decompiler::findEntryPoint (  )  [private]

Definition at line 106 of file decompiler.cpp.

Common::String Stark::Tools::Decompiler::getError (  )  const

Definition at line 273 of file decompiler.cpp.

void Stark::Tools::Decompiler::linkCommandBranches (  )  [private]

Definition at line 100 of file decompiler.cpp.

void Stark::Tools::Decompiler::printBlocks (  )  const

Definition at line 68 of file decompiler.cpp.

void Stark::Tools::Decompiler::printCommands (  )  const

Definition at line 62 of file decompiler.cpp.

void Stark::Tools::Decompiler::printDecompiled (  ) 

Definition at line 75 of file decompiler.cpp.

void Stark::Tools::Decompiler::verifyAST (  )  [private]

Definition at line 380 of file decompiler.cpp.

bool Stark::Tools::Decompiler::verifyCommandInAST ( CFGCommand cfgCommand  )  [private]

Definition at line 389 of file decompiler.cpp.

bool Stark::Tools::Decompiler::verifyCommandSuccessorInAST ( CFGCommand cfgCommand,
CFGCommand cfgSuccessor,
ASTNode astSuccessor,
const char *  successorType 
) [private]

Definition at line 422 of file decompiler.cpp.


Member Data Documentation

Definition at line 94 of file decompiler.h.

Definition at line 91 of file decompiler.h.

Definition at line 89 of file decompiler.h.

Definition at line 86 of file decompiler.h.


The documentation for this class was generated from the following files:


Generated on Sat Mar 23 2019 05:09:16 for ResidualVM by doxygen 1.7.1
curved edge   curved edge