feat: optimize runtime (2x+ faster)

This commit is contained in:
samsonium
2026-10-29 05:21:00 +03:00
parent eeca5e653d
commit 7b804b8809
9 changed files with 189 additions and 25 deletions
+17 -1
View File
@@ -1,4 +1,4 @@
#include "common/fzl_opcodes.h"
#include <common/fzl_opcodes.h>
#include <stdbool.h>
#include <stdio.h>
#include <vm/fzl_vm.h>
@@ -20,6 +20,22 @@ void fzl_vm_print_ops(fzl_vm_t *vm)
switch (vm->ops[i])
{
case FZL_OPCODE_STORE_LOCAL:
{
size_t depth = vm->ops[++i];
size_t slot = vm->ops[++i];
printf("STORE_LOCAL D=%zu S=%zu\n", depth, slot);
break;
}
case FZL_OPCODE_LOAD_LOCAL:
{
size_t depth = vm->ops[++i];
size_t slot = vm->ops[++i];
printf("LOAD_LOCAL D=%zu S=%zu\n", depth, slot);
break;
}
case FZL_OPCODE_BUILD_STR:
printf("BUILD_STR %zu\n", vm->ops[++i]);
break;