mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 10:11:44 -04:00
[decomp] finish actor-link-h and a few more (#592)
* finish actor-link-h * decompile files * fix pp issue
This commit is contained in:
+12
-6
@@ -417,12 +417,12 @@ std::vector<VariableNames::VarInfo> Env::extract_visible_variables(
|
||||
return entries;
|
||||
}
|
||||
|
||||
goos::Object Env::local_var_type_list(const Form* top_level_form,
|
||||
int nargs_to_ignore,
|
||||
int* count_out) const {
|
||||
FunctionVariableDefinitions Env::local_var_type_list(const Form* top_level_form,
|
||||
int nargs_to_ignore) const {
|
||||
assert(nargs_to_ignore <= 8);
|
||||
auto vars = extract_visible_variables(top_level_form);
|
||||
|
||||
FunctionVariableDefinitions result;
|
||||
std::vector<goos::Object> elts;
|
||||
elts.push_back(pretty_print::to_symbol("local-vars"));
|
||||
int count = 0;
|
||||
@@ -432,6 +432,11 @@ goos::Object Env::local_var_type_list(const Form* top_level_form,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (x.reg_id.reg == Register(Reg::GPR, Reg::S6)) {
|
||||
result.had_pp = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string lookup_name = x.name();
|
||||
auto remapped = m_var_remap.find(lookup_name);
|
||||
if (remapped != m_var_remap.end()) {
|
||||
@@ -459,10 +464,11 @@ goos::Object Env::local_var_type_list(const Form* top_level_form,
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count_out) {
|
||||
*count_out = count;
|
||||
result.count = count;
|
||||
if (count > 0) {
|
||||
result.local_vars = pretty_print::build_list(elts);
|
||||
}
|
||||
return pretty_print::build_list(elts);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::unordered_set<RegId, RegId::hash> Env::get_ssa_var(const RegAccessSet& vars) const {
|
||||
|
||||
Reference in New Issue
Block a user