Initial parser implementation that runs a simple hello_world.fun script.
This commit is contained in:
parent
284b4d3fa9
commit
7d587fe11b
5 changed files with 237 additions and 45 deletions
7
src/vm.h
7
src/vm.h
|
|
@ -39,13 +39,12 @@ typedef struct {
|
|||
// initialize VM (zero state)
|
||||
void vm_init(VM *vm);
|
||||
|
||||
// run entry Bytecode (pushes first frame)
|
||||
void vm_run(VM *vm, Bytecode *entry);
|
||||
|
||||
// helper function to clear the output
|
||||
void vm_clear_output(VM *vm);
|
||||
|
||||
void vm_print_output(VM *vm);
|
||||
void vm_free(VM *vm);
|
||||
// run entry Bytecode (pushes first frame)
|
||||
void vm_run(VM *vm, Bytecode *entry);
|
||||
|
||||
static inline int opcode_is_valid(int op) {
|
||||
return op >= OP_NOP && op <= OP_SWAP; // all current opcodes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue