[Decompiler] Add more expressions (Part 4) (#215)

* ref

* more

* one more

* up to insert cons

* recognize new

* fix memory bug!

* some mods to pair fields
This commit is contained in:
water111
2021-01-27 13:47:54 -05:00
committed by GitHub
parent b59e33c005
commit b35beab372
14 changed files with 1609 additions and 55 deletions
+2 -2
View File
@@ -483,7 +483,7 @@ void clean_up_cond_no_else_final(const Function& func, CondNoElseElement* cne) {
if (entry.false_destination.has_value()) {
auto fr = entry.false_destination;
assert(fr.has_value());
cne->final_destination = fr->reg();
cne->final_destination = *fr;
} else {
assert(false);
}
@@ -494,7 +494,7 @@ void clean_up_cond_no_else_final(const Function& func, CondNoElseElement* cne) {
if (func.ir2.env.has_reg_use()) {
auto& last_branch_info = func.ir2.env.reg_use().op.at(last_branch->op()->op_id());
cne->used_as_value = last_branch_info.written_and_unused.find(cne->final_destination) ==
cne->used_as_value = last_branch_info.written_and_unused.find(cne->final_destination.reg()) ==
last_branch_info.written_and_unused.end();
}