feat: optimize runtime (2x+ faster)
This commit is contained in:
+17
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user