summaryrefslogtreecommitdiff
path: root/vm.h
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-21 18:59:44 +0100
committerubq323 <ubq323@ubq323.website>2024-06-21 18:59:44 +0100
commit24f5d4f4456fce3a9e8cd5a7c1225facd60ae979 (patch)
tree095ff7ea3e3620402a9346ae5a9b2817de72c436 /vm.h
parentfbdfd9bf74b178a34543e0e347f441d689f73438 (diff)
put state and chunk into new compiler struct; refactor mildly
Diffstat (limited to 'vm.h')
-rw-r--r--vm.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/vm.h b/vm.h
index 6329655..c75df82 100644
--- a/vm.h
+++ b/vm.h
@@ -8,23 +8,7 @@
typedef struct _thread Thread;
#include "val.h"
-#include "state.h"
-
-typedef struct {
- struct {
- size_t len;
- size_t cap;
- uint8_t *d;
- } bc;
- struct {
- size_t len;
- size_t cap;
- Val *d;
- } consts;
-} Chunk;
-Chunk chunk_new(State *S);
-size_t chunk_wbc(State *S, Chunk *ch, uint8_t byte);
-size_t chunk_wconst(State *S, Chunk *ch, Val v);
+#include "com.h"
#define STACKSIZE 128
typedef struct _thread {