mirror of
https://github.com/open-goal/jak-project
synced 2026-06-24 01:41:29 -04:00
[Decompiler] Decompile let (#309)
* test * fix bug * fix tests for let * missing formatting fix
This commit is contained in:
@@ -1348,7 +1348,8 @@ void FunctionCallElement::update_from_stack(const Env& env,
|
||||
throw std::runtime_error("Failed to resolve.");
|
||||
}
|
||||
|
||||
arg_forms.insert(arg_forms.begin(), unsafe);
|
||||
arg_forms.insert(arg_forms.begin(), mr.maps.forms.at(0));
|
||||
|
||||
new_form = pool.alloc_element<GenericElement>(
|
||||
GenericOperator::make_function(mr.maps.forms.at(1)), arg_forms);
|
||||
|
||||
@@ -1750,8 +1751,10 @@ void CondWithElseElement::push_to_stack(const Env& env, FormPool& pool, FormStac
|
||||
if (rewrite_as_set && !set_unused) {
|
||||
for (auto& entry : entries) {
|
||||
rewrite_to_get_var(entry.body->elts(), pool, *last_var, env);
|
||||
entry.body->claim_all_children();
|
||||
}
|
||||
rewrite_to_get_var(else_ir->elts(), pool, *last_var, env);
|
||||
else_ir->claim_all_children();
|
||||
}
|
||||
|
||||
// update register info
|
||||
|
||||
Reference in New Issue
Block a user