[Decompiler] Decompile let (#309)

* test

* fix bug

* fix tests for let

* missing formatting fix
This commit is contained in:
water111
2021-03-05 18:48:01 -05:00
committed by GitHub
parent 9168f03289
commit 65ffe83468
20 changed files with 2312 additions and 1655 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include "decompiler/IR2/Env.h"
#include "decompiler/Function/Function.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