summaryrefslogtreecommitdiffstats
path: root/bytecode/heap.h
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2024-02-04 16:46:20 -0800
committerRose Hogenson <rosehogenson@posteo.net>2024-02-04 16:46:20 -0800
commit17face3633686e374aa0859271ccf462a48e60aa (patch)
tree6a5482717ef1b8194ccf347a6d8af06d664902cd /bytecode/heap.h
parentd940187fd8720e0ab3c00e5a6a7ae8f181c7752d (diff)
downloadsml-17face3633686e374aa0859271ccf462a48e60aa.tar.zst
Rewrite the bytecode interpreter in Rust.
Diffstat (limited to 'bytecode/heap.h')
-rw-r--r--bytecode/heap.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/bytecode/heap.h b/bytecode/heap.h
deleted file mode 100644
index c6c10c4..0000000
--- a/bytecode/heap.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _HEAP_H_
-#define _HEAP_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include "value.h"
-#include "value_slice.h"
-
-struct heap {
- // The heap is divided into two halves for garbage collection.
- // buf holds the malloc'd heap buffer.
- value *buf;
- // active and standby are slices that partition buf.
- value_slice active;
- value_slice standby;
-
- size_t free_ptr;
-
- size_t last_free;
- value_slice gc_roots;
-};
-
-struct heap new_heap(value_slice);
-value *alloc(struct heap *, int64_t);
-
-#endif