finalizers.h 368 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#pragma once

#include "bytecode.h"

#define FINALIZER_SIZE_ON_HEAP 5

struct finalizer {
	void (*fun)(BC_WORD);
	BC_WORD arg;
};

struct finalizers {
	void *descriptor;
	struct finalizers *next;
	struct finalizer *cur;
};

18
struct finalizers *next_interpreter_finalizer(struct finalizers *);
19
BC_WORD *build_finalizer(BC_WORD *heap, void (*fun)(BC_WORD), BC_WORD arg);