This commit is contained in:
2026-05-17 10:03:02 -05:00
parent 6f0c3a729b
commit 5001302855
8 changed files with 137 additions and 51 deletions

View File

@@ -176,6 +176,18 @@ Instruction code_next_instruction(Code const* code, uint32_t function_id, uint32
#ifdef DEBUG_ASSEMBLY
void code_debug_bytecode(Code const* code)
{
for (int i = 0; i < code->bytecode_sz; ++i) {
if (i % 16 == 0)
printf("%04X : ", i);
printf("%02X ", code->bytecode[i]);
if (i % 16 == 15)
printf("\n");
}
printf("\n");
}
void code_decompile(Code const* code)
{
if (code_n_consts(code) > 0)