[Decompiler] Clean Up (#271)

* clean up

* fix up until generic ops

* finish kernel

* documentation

* types

* add missing file
This commit is contained in:
water111
2021-02-18 11:35:45 -05:00
committed by GitHub
parent 1b5b9a2469
commit db48d94270
15 changed files with 1230 additions and 784 deletions
+15
View File
@@ -191,6 +191,21 @@ Form* FormStack::unsafe_peek(Register reg, const Env& env) {
return nullptr;
}
FormElement* FormStack::pop_back(FormPool& pool) {
auto& back = m_stack.back();
assert(back.active);
back.active = false;
if (back.elt) {
return back.elt;
} else {
assert(back.destination.has_value());
auto elt = pool.alloc_element<SetVarElement>(*back.destination, back.source,
back.sequence_point, back.set_info);
back.source->parent_element = elt;
return elt;
}
}
std::vector<FormElement*> FormStack::rewrite(FormPool& pool) {
std::vector<FormElement*> result;