Bytecode binary format deserializer.
void readInstructions(Bytecode &bytecode)
Helper method to read Instructions Table.
i64 readInt64()
Helper method to read Int64.
void readConstantPool(Bytecode &bytecode)
Helper method to read Constants Table.
Value readValue()
Read a single Value (recursive — handles nested structs/arrays).
Bytecode deserialize(const std::vector< u8 > &data)
Deserialize bytecode from binary buffer.
Bytecode loadFromFile(const std::filesystem::path &filename)
Load bytecode from .phsb file.
void readFunctionEntries(Bytecode &bytecode)
Helper method to read Function Entries.
u16 readUInt16()
Helper method to read UInt16.
u32 readUInt32()
Helper method to read UInt32.
static u32 calculateCRC32(const u8 *data, size_t size)
Calculate CRC32 checksum.
void readStructSection(Bytecode &bytecode)
Helper method to read Struct Section.
u8 readUInt8()
Helper method to read UInt8.
void readVariableMapping(Bytecode &bytecode)
Helper method to read Variable Table.
f64 readDouble()
Helper method to read Double.
void readHeader(u32 &checksum)
Helper method to read Header.
i32 readInt32()
Helper method to read Int32.
std::string readString()
Helper method to read String.
A value in the Phasor VM.
The Phasor Programming Language and Runtime.
Complete bytecode structure.