#ifndef JAK_CODEGENOUTPUT_H #define JAK_CODEGENOUTPUT_H #include #include #include #include "shared_config.h" /*! * The result of the codegen process. * It is stored part by part for debugging purposes at this point * but the to_vector() method knows how to combine it into a blob for loading. */ struct CodegenOutput { // code and objects std::array, N_SEG> code; // the link data std::array, N_SEG> link_tables; // maps from instr_idx to offset into code std::array, N_SEG> instr_offsets; // the header data (goes before the link_tables to form the link section) std::vector header; // offset into the segment's code for where the static objects start. std::array static_start; // make into a single blob for loading into the runtime. std::vector to_vector(); }; #endif // JAK_CODEGENOUTPUT_H