diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-21 18:59:44 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-21 18:59:44 +0100 |
commit | 24f5d4f4456fce3a9e8cd5a7c1225facd60ae979 (patch) | |
tree | 095ff7ea3e3620402a9346ae5a9b2817de72c436 /vm.h | |
parent | fbdfd9bf74b178a34543e0e347f441d689f73438 (diff) |
put state and chunk into new compiler struct; refactor mildly
Diffstat (limited to 'vm.h')
-rw-r--r-- | vm.h | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -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 { |