From 17face3633686e374aa0859271ccf462a48e60aa Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 4 Feb 2024 16:46:20 -0800 Subject: Rewrite the bytecode interpreter in Rust. --- bytecode/heap.h | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 bytecode/heap.h (limited to 'bytecode/heap.h') 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 -#include - -#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 -- cgit v1.3.1