Phasor IR Serializer/Deserializer.
More...
#include <PhasorIR.hpp>
Phasor IR Serializer/Deserializer.
Definition at line 16 of file PhasorIR.hpp.
◆ OperandType
| Enumerator |
|---|
| NONE | |
| INT | |
| REGISTER | |
| CONSTANT_IDX | |
| VARIABLE_IDX | |
| FUNCTION_IDX | |
Definition at line 44 of file PhasorIR.hpp.
◆ deserialize()
| Bytecode Phasor::PhasorIR::deserialize |
( |
const std::vector< uint8_t > & | data | ) |
|
|
static |
◆ escapeString()
| std::string Phasor::PhasorIR::escapeString |
( |
const std::string & | str | ) |
|
|
static |
Helper to escape strings for text format.
Definition at line 353 of file PhasorIR.cpp.
◆ getOperandCount()
| int Phasor::PhasorIR::getOperandCount |
( |
OpCode | op | ) |
|
|
staticprivate |
◆ getOperandType()
◆ loadFromFile()
| Bytecode Phasor::PhasorIR::loadFromFile |
( |
const std::filesystem::path & | filename | ) |
|
|
static |
Load bytecode from .phir file.
Definition at line 781 of file PhasorIR.cpp.
◆ opCodeToString()
| std::string Phasor::PhasorIR::opCodeToString |
( |
OpCode | op | ) |
|
|
static |
◆ saveToFile()
| bool Phasor::PhasorIR::saveToFile |
( |
const Bytecode & | bytecode, |
|
|
const std::filesystem::path & | filename ) |
|
static |
◆ serialize()
| std::vector< uint8_t > Phasor::PhasorIR::serialize |
( |
const Bytecode & | bytecode | ) |
|
|
static |
◆ stringToOpCode()
| OpCode Phasor::PhasorIR::stringToOpCode |
( |
const std::string & | str | ) |
|
|
static |
◆ unescapeString()
| std::string Phasor::PhasorIR::unescapeString |
( |
const std::string & | str | ) |
|
|
static |
Helper to unescape strings from text format.
Definition at line 383 of file PhasorIR.cpp.
◆ opCodeToStringMap
| const std::unordered_map< OpCode, std::string > Phasor::PhasorIR::opCodeToStringMap |
|
staticprivate |
◆ stringToOpCodeMap
| const std::unordered_map< std::string, OpCode > Phasor::PhasorIR::stringToOpCodeMap |
|
staticprivate |
Initial value: = [] {
std::unordered_map<std::string, OpCode> map;
{
map[pair.second] = pair.first;
}
return map;
}()
static const std::unordered_map< OpCode, std::string > opCodeToStringMap
Definition at line 58 of file PhasorIR.hpp.
The documentation for this class was generated from the following files: