Cleanup some stuff

This commit is contained in:
zongor 2025-06-22 15:03:25 -04:00
parent a741a0c992
commit f909071287
4 changed files with 4 additions and 4 deletions

View File

@ -6,8 +6,8 @@
typedef struct Code Code;
struct Code {
Value *memory;
VMFrame current;
uint32_t size;
Frame current;
};
Code* demo_add_compile ();

View File

@ -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 */

View File

@ -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 */

View File

@ -3,6 +3,6 @@
#include "opcodes.h"
uint32_t step_vm(VMFrame *frame, Value *memory);
uint32_t step_vm(Frame *frame, Value *memory);
#endif