#include "bytecode.hh" namespace tyche { Bytecode::Bytecode(BytecodePrototype const& bp) { // header byte_array_.add_uint32(0, MAGIC); byte_array_.add_byte(4, VERSION); // constants std::vector constant_indexes; std::vector constant_array; for (auto const& constant: bp.constants) { } // constants table // function table } uint32_t Bytecode::n_constants() const { return 0; } uint32_t Bytecode::n_functions() const { return 0; } int32_t Bytecode::get_constant_int(uint32_t addr) const { return 0; } float Bytecode::get_constant_float(uint32_t addr) const { return 0; } std::string Bytecode::get_constant_string(uint32_t addr) const { return std::string(); } Bytecode::FunctionDef Bytecode::get_function_def(uint32_t function_id) const { return Bytecode::FunctionDef(); } uint8_t Bytecode::get_code_byte(uint32_t function_id, uint32_t idx) const { return 0; } int32_t Bytecode::get_code_int(uint32_t function_id, uint32_t idx) const { return 0; } float Bytecode::get_code_float(uint32_t function_id, uint32_t idx) const { return 0; } }