now tests are passing

This commit is contained in:
Kasey White
2023-04-09 00:49:43 -04:00
committed by Kasey
parent efb901f3b4
commit 9e95e24624
3 changed files with 14 additions and 34 deletions

View File

@@ -2753,34 +2753,6 @@ impl<'a> CodeGenerator<'a> {
let func_scope = func_index_map.get(&func).unwrap();
let mut added_dependencies = vec![];
let Some(function_component) = function_definitions.get(&func)
else {
unreachable!("Function Definition should exist");
};
if !function_component.args.is_empty() {
for same_scope_func in func_index_map
.iter()
.filter(|item| item.1 == func_scope && &func != item.0)
.map(|item| item.0)
{
if !self.defined_functions.contains_key(same_scope_func)
&& !final_func_dep_ir.contains_key(same_scope_func)
{
added_dependencies.push(same_scope_func.clone());
}
}
}
let Some(function_component) = function_definitions.get_mut(&func)
else {
unreachable!("Function Definition should exist");
};
function_component.dependencies.extend(added_dependencies);
let function_component = function_definitions.get(&func).unwrap();
let mut dep_ir = vec![];