jak-project/decompiler/analysis/insert_lets.h
water111 f9d8fcd6e4
[decomp] add mips2c converter (#842)
* mips 2 c basic version, not yet tested

* calling works without crashing, but the function doesn't

* it works

* add test

* cleanup and actually add the test

* dont use mips2c by default for font

* clean up formatting
2021-09-11 20:52:35 -04:00

21 lines
457 B
C++

#pragma once
#include "decompiler/Function/Function.h"
#include "decompiler/IR2/Env.h"
#include "decompiler/IR2/Form.h"
namespace decompiler {
struct LetStats {
int total_vars = 0;
int vars_in_lets = 0;
void operator+=(const LetStats& other) {
total_vars += other.total_vars;
vars_in_lets += other.vars_in_lets;
}
};
LetStats insert_lets(const Function& func, Env& env, FormPool& pool, Form* top_level_form);
} // namespace decompiler