Base class for engines.
More...
#include <Engine.h>
◆ ~Engine()
virtual Engine::~Engine |
( |
| ) |
|
|
virtualdefault |
◆ GetCodeGenerator()
virtual std::unique_ptr< CodeGenerator > Engine::GetCodeGenerator |
( |
const InstVec & |
insts, |
|
|
std::ostream & |
output |
|
) |
| |
|
pure virtual |
Retrieve the code generator for the engine.
- Parameters
-
[in] | insts | The list of instructions. |
[out] | output | Stream to output the code to. |
- Returns
- Pointer to a CodeGenerator for the engine.
Implemented in FieldEngine, and WorldEngine.
◆ GetDisassembler() [1/2]
Retrieve the disassembler for the engine.
- Parameters
-
[out] | insts | Vector to place the Instructions in. |
- Returns
- Pointer to a disassembler for the engine.
Implemented in FieldEngine, and WorldEngine.
◆ GetDisassembler() [2/2]
std::unique_ptr< Disassembler > Engine::GetDisassembler |
( |
InstVec & |
insts, |
|
|
const std::vector< unsigned char > & |
c |
|
) |
| |
|
virtual |
◆ GetVariants()
void Engine::GetVariants |
( |
std::vector< std::string > & |
variants | ) |
const |
|
virtual |
Retrieves the names of all variants supported for this engine.
If variants are not used by this engine, it will be empty (default implementation).
- Parameters
-
[out] | variants | Vector with the supported variants. |
Reimplemented in WorldEngine.
◆ PostCFG()
Post-processing step after CFG analysis.
- Parameters
-
[out] | insts | Vector to place the Instructions in. |
[in] | graph | Graph generated from the CFG analysis. |
Reimplemented in FieldEngine, and WorldEngine.
◆ SupportsCodeFlow()
bool Engine::SupportsCodeFlow |
( |
| ) |
const |
|
virtual |
Whether or not code flow analysis is supported for this engine.
- Returns
- True if supported, false if not. If false is returned, code flow analysis should not take place.
◆ SupportsCodeGen()
bool Engine::SupportsCodeGen |
( |
| ) |
const |
|
virtual |
Whether or not code generation is supported for this engine.
- Returns
- True if supported, false if not. If false is returned, code generation should not take place.
◆ UsePureGrouping()
bool Engine::UsePureGrouping |
( |
| ) |
const |
|
virtual |
Whether or not to use "pure" grouping during code flow analysis.
With pure grouping, code flow analysis only looks at branches when merging. This method may be more appropriate for non-stack-based engines.
- Returns
- True if pure grouping should be used, false if not.
Reimplemented in FieldEngine, and WorldEngine.
◆ functions
Map to functions in the current script, indexed by start address.
◆ variant_
std::string Engine::variant_ |
|
protected |
Engine variant to use for the script.
The documentation for this class was generated from the following files: