feat+ref: refactor + new types
This commit is contained in:
+11
-2
@@ -1,6 +1,7 @@
|
||||
#ifndef FZL_VM_H
|
||||
#define FZL_VM_H
|
||||
|
||||
#include <common/fzl_value.h>
|
||||
#include <compiler/utils/fzl_const_pool.h> // NOTE: move outside compiler scope to common
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
@@ -16,8 +17,16 @@ typedef struct
|
||||
|
||||
size_t ip;
|
||||
|
||||
fzl_const_t stack[256];
|
||||
size_t stack_top;
|
||||
// Data stack
|
||||
fzl_value_t dstack[256];
|
||||
size_t dtop;
|
||||
|
||||
// Call stack
|
||||
size_t cstack[256];
|
||||
size_t ctop;
|
||||
|
||||
// Environment stack
|
||||
// TODO: implement `estack` and `etop`
|
||||
} fzl_vm_t;
|
||||
|
||||
// Allocate FZL VM
|
||||
|
||||
Reference in New Issue
Block a user