Refactor l2vm

This commit is contained in:
2021-04-07 22:24:33 +03:00
parent 8f694a0bca
commit c74ea3b417
25 changed files with 653 additions and 285 deletions
+14
View File
@@ -0,0 +1,14 @@
#pragma once
#include <stddef.h>
#include <stdint.h>
// uint64_t only
struct stack {
size_t sp, size;
uint64_t *data;
};
int stack_init(struct stack *st, size_t size);
void stack_free(struct stack *st);
int stack_push(struct stack *st, uint64_t w);
int stack_pop(struct stack *st, uint64_t *w);