[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
+4 -1
View File
@@ -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