diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2023-02-11 13:40:10 -0800 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2023-02-11 13:40:10 -0800 |
| commit | 60622614731bc42dd44704d3cff55b4e4c4f492c (patch) | |
| tree | dcf3b31f46c1b46e23d5c379a9201195ccb4f1ce /bytecode/slice.h | |
| parent | 5aec138c3832a65bad4b2bdaa7ca36cf5c279ac8 (diff) | |
| download | sml-60622614731bc42dd44704d3cff55b4e4c4f492c.tar.zst | |
Write a garbage collector.
Does it work? No, but it compiles.
Diffstat (limited to 'bytecode/slice.h')
| -rw-r--r-- | bytecode/slice.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bytecode/slice.h b/bytecode/slice.h index 509f7ca..577befd 100644 --- a/bytecode/slice.h +++ b/bytecode/slice.h @@ -4,13 +4,24 @@ #include <stddef.h> #include <stdint.h> +#include "value.h" + struct slice { size_t size; uint8_t *buf; }; +struct val_slice { + size_t size; + value *buf; +}; + struct slice slice(struct slice, size_t, size_t); struct slice slice1(struct slice, size_t); +struct val_slice val_slice(struct val_slice, size_t, size_t); + +struct val_slice val_slice1(struct val_slice, size_t); + #endif |
