Bytecode binary format deserializer.
uint32_t readUInt32()
Helper method to read UInt32.
void readInstructions(Bytecode &bytecode)
Helper method to read Instuctions Table.
uint32_t calculateCRC32(const uint8_t *data, size_t size)
Calculate CRC32 checksum.
void validateHeader(uint32_t expectedChecksum)
Validate header.
void readHeader(uint32_t &checksum)
Helper method to read Header.
void readConstantPool(Bytecode &bytecode)
Helper method to read Constants Table.
Bytecode loadFromFile(const std::filesystem::path &filename)
Load bytecode from .phsb file.
void readFunctionEntries(Bytecode &bytecode)
Helper method to read Function Entries.
uint16_t readUInt16()
Helper method to read UInt16.
Bytecode deserialize(const std::vector< uint8_t > &data)
Deserialize bytecode from binary buffer.
void readVariableMapping(Bytecode &bytecode)
Helper method to read Variable Table.
uint8_t readUInt8()
Helper method to read UInt8.
int32_t readInt32()
Helper method to read Int32.
The Phasor Programming Language and Runtime.
Complete bytecode structure.