mirror of
https://github.com/open-goal/jak-project
synced 2026-07-07 06:05:15 -04:00
[Decompiler] Expression Building (#211)
* up to ash * add more expressions * fix some return variable usage nonsense * bfloat print working * basic-type working * type working, fix decompiler on all files * clang format
This commit is contained in:
@@ -89,7 +89,9 @@ std::vector<FormElement*> FormStack::rewrite(FormPool& pool) {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<FormElement*> FormStack::rewrite_to_get_reg(FormPool& pool, Register reg) {
|
||||
std::vector<FormElement*> FormStack::rewrite_to_get_reg(FormPool& pool,
|
||||
Register reg,
|
||||
const Env& env) {
|
||||
// first, rewrite as normal.
|
||||
auto default_result = rewrite(pool);
|
||||
|
||||
@@ -105,7 +107,8 @@ std::vector<FormElement*> FormStack::rewrite_to_get_reg(FormPool& pool, Register
|
||||
}
|
||||
return default_result;
|
||||
} else {
|
||||
throw std::runtime_error(fmt::format("Couldn't rewrite form to get result"));
|
||||
throw std::runtime_error(
|
||||
fmt::format("Couldn't rewrite form to get result {}:\n{}\n\n", reg.to_charp(), print(env)));
|
||||
}
|
||||
}
|
||||
} // namespace decompiler
|
||||
Reference in New Issue
Block a user