2021-03-05 18:48:01 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "decompiler/Function/Function.h"
|
2021-09-11 20:52:35 -04:00
|
|
|
#include "decompiler/IR2/Env.h"
|
2021-03-05 18:48:01 -05:00
|
|
|
#include "decompiler/IR2/Form.h"
|
2022-05-19 21:30:14 -04:00
|
|
|
#include "decompiler/ObjectFile/ObjectFileDB.h"
|
2021-03-05 18:48:01 -05:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
LetStats insert_lets(const Function& func,
|
|
|
|
Env& env,
|
|
|
|
FormPool& pool,
|
|
|
|
Form* top_level_form,
|
|
|
|
LetRewriteStats& let_stats);
|
2021-03-05 18:48:01 -05:00
|
|
|
|
2022-05-19 21:30:14 -04:00
|
|
|
} // namespace decompiler
|