mirror of
https://github.com/open-goal/jak-project
synced 2026-08-20 06:16:35 -04:00
[Decomp] Decompile gstring (#267)
* decompile gstring * update * Update code_status.md * Update code_status.md * decompile gstate * add test for states, hope it passes * also test throw and catch xmms * update doc
This commit is contained in:
@@ -1463,6 +1463,8 @@ Form* cfg_to_ir(FormPool& pool, Function& f, const CfgVtx* vtx) {
|
||||
nullptr, cfg_to_ir(pool, f, cvtx->body), cfg_to_ir(pool, f, cvtx->unreachable_block));
|
||||
clean_up_break(pool, dynamic_cast<BreakElement*>(result->try_as_single_element()));
|
||||
return result;
|
||||
} else if (dynamic_cast<const EmptyVtx*>(vtx)) {
|
||||
return pool.alloc_single_element_form<EmptyElement>(nullptr);
|
||||
}
|
||||
|
||||
throw std::runtime_error("not yet implemented IR conversion.");
|
||||
|
||||
@@ -95,6 +95,23 @@ std::string final_defun_out(const Function& func,
|
||||
append(top_form, pretty_print::build_list(inline_body));
|
||||
return pretty_print::to_string(top_form);
|
||||
}
|
||||
|
||||
if (func.guessed_name.kind == FunctionName::FunctionKind::UNIDENTIFIED) {
|
||||
std::string def_name = "defun-anon";
|
||||
assert(special_mode == FunctionDefSpecials::NONE);
|
||||
std::vector<goos::Object> top;
|
||||
top.push_back(pretty_print::to_symbol(def_name));
|
||||
top.push_back(pretty_print::to_symbol(func.guessed_name.to_string()));
|
||||
top.push_back(arguments);
|
||||
auto top_form = pretty_print::build_list(top);
|
||||
|
||||
if (var_count > 0) {
|
||||
append(top_form, pretty_print::build_list(var_dec));
|
||||
}
|
||||
|
||||
append(top_form, pretty_print::build_list(inline_body));
|
||||
return pretty_print::to_string(top_form);
|
||||
}
|
||||
return "nyi";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user