mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
[decompiler] Several small fixes (#775)
* fix assorted bugs * stricter return types * only look for functions in code files
This commit is contained in:
@@ -2776,6 +2776,32 @@ void LabelElement::apply_form(const std::function<void(Form*)>&) {}
|
||||
void LabelElement::collect_vars(RegAccessSet&, bool) const {}
|
||||
void LabelElement::get_modified_regs(RegSet&) const {}
|
||||
|
||||
////////////////////////////////
|
||||
// LabelDerefElement
|
||||
///////////////////////////////
|
||||
|
||||
LabelDerefElement::LabelDerefElement(int lid,
|
||||
int size,
|
||||
LoadVarOp::Kind load_kind,
|
||||
RegisterAccess var)
|
||||
: m_lid(lid), m_size(size), m_load_kind(load_kind), m_var(var) {}
|
||||
|
||||
goos::Object LabelDerefElement::to_form_internal(const Env& env) const {
|
||||
return pretty_print::build_list(fmt::format("label-deref {} :label {} :size {} :kind {}",
|
||||
m_var.to_string(env), env.file->labels.at(m_lid).name,
|
||||
m_size, load_kind_to_string(m_load_kind)));
|
||||
}
|
||||
|
||||
void LabelDerefElement::apply(const std::function<void(FormElement*)>& f) {
|
||||
f(this);
|
||||
}
|
||||
|
||||
void LabelDerefElement::apply_form(const std::function<void(Form*)>&) {}
|
||||
void LabelDerefElement::collect_vars(RegAccessSet& regs, bool) const {
|
||||
regs.insert(m_var);
|
||||
}
|
||||
void LabelDerefElement::get_modified_regs(RegSet&) const {}
|
||||
|
||||
////////////////////////////////
|
||||
// GetSymbolStringPointer
|
||||
//////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user