Files
jak-project/goalc/compiler/CompilerSettings.h
T
water111 90a7e9b4b9 Add addition and subtraction for integers, build macros, dgo building, and build/load test (#35)
* see if math works on windows

* add dgo

* windows debug

* windows debug 2

* one more debug try

* add extra debug print and change logic for slashes

* update

* again

* try again

* remove build game

* remove build game

* add back build-game

* remove runtime from test

* test

* reduce number of files

* go to c++ 14

* big stacks

* increase stack size again

* clean up cmake files
2020-09-12 20:41:12 -04:00

31 lines
687 B
C++

#ifndef JAK_COMPILERSETTINGS_H
#define JAK_COMPILERSETTINGS_H
#include <unordered_map>
#include <string>
#include "goalc/goos/Object.h"
class CompilerSettings {
public:
CompilerSettings();
bool debug_print_ir = false;
bool debug_print_regalloc = false;
bool disable_math_const_prop = false;
bool emit_move_after_return = true;
void set(const std::string& name, const goos::Object& value);
private:
enum class SettingKind { BOOL, INVALID };
struct SettingsEntry {
SettingKind kind = SettingKind::INVALID;
goos::Object value;
bool* boolp = nullptr;
};
std::unordered_map<std::string, SettingsEntry> m_settings;
};
#endif // JAK_COMPILERSETTINGS_H