mirror of
https://github.com/open-goal/jak-project
synced 2026-08-02 00:34:13 -04:00
[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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user