From f909071287fdff02d765fcdf47326e1998d5161f Mon Sep 17 00:00:00 2001 From: zongor Date: Sun, 22 Jun 2025 15:03:25 -0400 Subject: [PATCH] Cleanup some stuff --- src/compiler.h | 2 +- src/opcodes.h | 2 +- src/vm.c | 2 +- src/vm.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler.h b/src/compiler.h index 967c2fb..bf30279 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -6,8 +6,8 @@ typedef struct Code Code; struct Code { Value *memory; - VMFrame current; uint32_t size; + Frame current; }; Code* demo_add_compile (); diff --git a/src/opcodes.h b/src/opcodes.h index 34a7828..eef8c43 100644 --- a/src/opcodes.h +++ b/src/opcodes.h @@ -15,7 +15,7 @@ typedef union { typedef struct { Value registers[MAX_REGS]; /* R0-R255 */ uint32_t pc; /* Program counter */ -} VMFrame; +} Frame; typedef enum { OP_HALT, /* terminate execution */ diff --git a/src/vm.c b/src/vm.c index 7e1a2de..515bb3e 100644 --- a/src/vm.c +++ b/src/vm.c @@ -31,7 +31,7 @@ void mem_strcpy(Value *memory, const char *str, uint32_t length, /** * Step to the next opcode in the vm. */ -uint32_t step_vm(VMFrame *frame, Value *memory) { +uint32_t step_vm(Frame *frame, Value *memory) { uint32_t instruction = memory[frame->pc].u; /* Extract 8-bit register indices from 32-bit instruction */ diff --git a/src/vm.h b/src/vm.h index 6f39c62..9ff7d5e 100644 --- a/src/vm.h +++ b/src/vm.h @@ -3,6 +3,6 @@ #include "opcodes.h" -uint32_t step_vm(VMFrame *frame, Value *memory); +uint32_t step_vm(Frame *frame, Value *memory); #endif