Use better naming for module functions

This commit is contained in:
Syrus
2020-07-26 12:02:45 -07:00
parent 6785e7e7ad
commit a732159514
23 changed files with 91 additions and 88 deletions

View File

@ -43,7 +43,7 @@ impl Compiler for LLVMCompiler {
function_body_inputs: PrimaryMap<LocalFunctionIndex, FunctionBodyData<'data>>,
) -> Result<Compilation, CompileError> {
//let data = Arc::new(Mutex::new(0));
let mut func_names = SecondaryMap::new();
let mut function_names = SecondaryMap::new();
let memory_styles = &compile_info.memory_styles;
let table_styles = &compile_info.table_styles;
let module = &compile_info.module;
@ -51,8 +51,8 @@ impl Compiler for LLVMCompiler {
// TODO: merge constants in sections.
for (func_index, _) in &module.functions {
func_names[func_index] = module
.func_names
function_names[func_index] = module
.function_names
.get(&func_index)
.cloned()
.unwrap_or_else(|| format!("fn{}", func_index.index()));
@ -80,7 +80,7 @@ impl Compiler for LLVMCompiler {
self.config(),
memory_styles,
&table_styles,
&func_names,
&function_names,
)
},
)