mirror of
https://github.com/open-goal/jak-project
synced 2026-05-28 08:25:56 -04:00
951f31878e
* track where segments are when debugging * missing windows include * figure out what function we're in * addr to IR is working
31 lines
653 B
C++
31 lines
653 B
C++
/*!
|
|
* @file CodeGenerator.h
|
|
* Generate object files from a FileEnv using an emitter::ObjectGenerator.
|
|
* Populates a DebugInfo.
|
|
* Currently owns the logic for emitting the function prologues.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef JAK_CODEGENERATOR_H
|
|
#define JAK_CODEGENERATOR_H
|
|
|
|
#include "Env.h"
|
|
#include "goalc/emitter/ObjectGenerator.h"
|
|
|
|
class DebugInfo;
|
|
|
|
class CodeGenerator {
|
|
public:
|
|
CodeGenerator(FileEnv* env, DebugInfo* debug_info);
|
|
std::vector<u8> run();
|
|
|
|
private:
|
|
void do_function(FunctionEnv* env, int f_idx);
|
|
emitter::ObjectGenerator m_gen;
|
|
FileEnv* m_fe = nullptr;
|
|
DebugInfo* m_debug_info = nullptr;
|
|
};
|
|
|
|
#endif // JAK_CODEGENERATOR_H
|