#ifndef AMALGAM_BYTECODE_H #define AMALGAM_BYTECODE_H #include "../std/defs.h" #include "../std/misc.h" #include "../std/buffer.h" #include "../defs.h" #include typedef enum { NOP, /* To allow hot-patching */ } BytecodeInstruction; typedef u8 BytecodeInstructionType; typedef struct { Buffer/**/ instructions; } Bytecode; typedef struct { jmp_buf env; Bytecode *bytecode; Parser *parser; /* borrowed */ } BytecodeCompilerContext; CHECK_RESULT int bytecode_init(Bytecode *self, ScopedAllocator *allocator); /* longjump to self->env on failure */ void generate_bytecode_from_ssa(BytecodeCompilerContext *self); #endif