change to uint8_t for bytecode to reduce wasted bytes
This commit is contained in:
@@ -10,10 +10,10 @@ size_t translate_parsed_number(Translated *translated, char *number_str, size_t
|
||||
size_t number_pos = arena_push(&translated->constants, number_str, length);
|
||||
set_registers(translated, to_register+1);
|
||||
|
||||
size_t start = push_instruction_code(translated, OP_LOAD_CONST);
|
||||
push_instruction_code(translated, to_register);
|
||||
size_t start = push_instruction_byte(translated, OP_LOAD_CONST);
|
||||
push_instruction_byte(translated, to_register);
|
||||
|
||||
push_instruction_code(translated, TYPE_OP_NUMBER);
|
||||
push_instruction_byte(translated, TYPE_OP_NUMBER);
|
||||
push_instruction_code(translated,length);
|
||||
push_instruction_code(translated, number_pos);
|
||||
return start;
|
||||
|
||||
Reference in New Issue
Block a user