mirror of
https://github.com/open-goal/jak-project
synced 2026-08-22 07:04:29 -04:00
decomp: finish target-[util|darkjak|swim|gun] | water | water-anim | crates | dark-eco-pool, fix skelgroup detection, add failed store/load warnings and clean up jak 3 config (#1958)
Almost done: - `target-handler` (`(none)` event handler casts and CFG error) - `target2` (`(none)` event handler casts) - `powerups` (`cloud-track` does some weird stuff with `handle`s) - `gun-states` (CFG error) Some progress in: - `water-flow` Additionally: - Clean up the two year old Jak 3 config file and add a config skeleton (disassembling seems to not have worked, but I was able to dump obj files and the `all_scripts` file) - Fix automatic skelgroup detection and `defskelgroup` macro for Jak 2 (closes #1950) - When a function decompiles without any major errors, a warning is generated with the op id for each unresolved load and store that will likely fail to compile (closes #1933)
This commit is contained in:
@@ -475,6 +475,10 @@ FormElement* StoreOp::get_as_form(FormPool& pool, const Env& env) const {
|
||||
}
|
||||
}
|
||||
}
|
||||
// print warning about failed store, but only if decompilation passes without any major errors
|
||||
if (!env.func->warnings.has_errors()) {
|
||||
env.func->warnings.warning("Failed store: {} at op {}", to_string(env), m_my_idx);
|
||||
}
|
||||
return pool.alloc_element<StoreElement>(this);
|
||||
}
|
||||
|
||||
@@ -733,6 +737,9 @@ Form* LoadVarOp::get_load_src(FormPool& pool, const Env& env) const {
|
||||
// LoadSourceElement::update_from_stack, which needs expressions)
|
||||
auto source =
|
||||
pool.alloc_single_element_form<SimpleExpressionElement>(nullptr, m_src, m_my_idx);
|
||||
if (!env.func->warnings.has_errors()) {
|
||||
env.func->warnings.warning("Failed load: {} at op {}", to_string(env), m_my_idx);
|
||||
}
|
||||
return pool.alloc_single_element_form<LoadSourceElement>(nullptr, source, m_size, m_kind, ro,
|
||||
input_type);
|
||||
}
|
||||
@@ -746,6 +753,9 @@ Form* LoadVarOp::get_load_src(FormPool& pool, const Env& env) const {
|
||||
}
|
||||
|
||||
auto source = pool.alloc_single_element_form<SimpleExpressionElement>(nullptr, m_src, m_my_idx);
|
||||
if (!env.func->warnings.has_errors()) {
|
||||
env.func->warnings.warning("Failed load: {} at op {}", to_string(env), m_my_idx);
|
||||
}
|
||||
return pool.alloc_single_element_form<LoadSourceElement>(
|
||||
nullptr, source, m_size, m_kind, std::optional<IR2_RegOffset>{}, TP_Type());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user