.
This commit is contained in:
@@ -2,5 +2,67 @@
|
||||
|
||||
namespace tyche {
|
||||
|
||||
Bytecode::Bytecode(BytecodePrototype const& bp)
|
||||
{
|
||||
// header
|
||||
byte_array_.add_uint32(0, MAGIC);
|
||||
byte_array_.add_byte(4, VERSION);
|
||||
|
||||
// constants
|
||||
std::vector<uint32_t> constant_indexes;
|
||||
std::vector<uint8_t> 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user