diff options
Diffstat (limited to 'bytecode/oper.c')
| -rw-r--r-- | bytecode/oper.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bytecode/oper.c b/bytecode/oper.c index fcb7d77..0bdb8f6 100644 --- a/bytecode/oper.c +++ b/bytecode/oper.c @@ -1,11 +1,12 @@ #include <stdbool.h> #include <stdlib.h> +#include "byte_slice.h" #include "encoding.h" #include "heap.h" #include "panic.h" -#include "slice.h" #include "value.h" +#include "value_slice.h" #include "oper.h" @@ -81,15 +82,15 @@ static void op(struct st *s, struct op oper) } } -void run(struct slice prog) +void run(uint8_t_slice prog) { struct st s = { .i = 0, .locals = { 0 }, }; - s.heap = new_heap((struct val_slice) { .size = NUM_LOCALS, .buf = s.locals }); + s.heap = new_heap((value_slice) { .size = NUM_LOCALS, .buf = s.locals }); while (true) { - struct result oper = parse(slice1(prog, s.i)); + struct result oper = parse(uint8_t_slice1(prog, s.i)); s.i += oper.n; op(&s, oper.op); } |
