From 4c3b2fec322feb8afd23703866d81f1dda51b6ae Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 11 Feb 2023 09:41:54 -0800 Subject: Add a bytecode interpreter. I wrote it in C because I actually like programming in C. Turns out setting up a Makefile is really easy too. --- bytecode/value.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 bytecode/value.h (limited to 'bytecode/value.h') diff --git a/bytecode/value.h b/bytecode/value.h new file mode 100644 index 0000000..3fa78c4 --- /dev/null +++ b/bytecode/value.h @@ -0,0 +1,21 @@ +#ifndef _VALUE_H_ +#define _VALUE_H_ + +#include +#include + +typedef uint64_t value; + +bool is_int(value); + +int64_t to_int(value); + +value from_int(int64_t); + +bool is_pointer(value); + +value *to_pointer(value); + +value from_pointer(value *); + +#endif -- cgit v1.3.1