mirror of
https://github.com/mii443/wasmer.git
synced 2025-09-03 07:59:25 +00:00
Sometimes we generate our own function names. Look up names in our name map, not the wasm module.
This commit is contained in:
@ -207,6 +207,7 @@ impl FuncTranslator {
|
|||||||
// TODO: pointer width
|
// TODO: pointer width
|
||||||
vmoffsets: VMOffsets::new(8, &wasm_module),
|
vmoffsets: VMOffsets::new(8, &wasm_module),
|
||||||
wasm_module,
|
wasm_module,
|
||||||
|
func_names,
|
||||||
};
|
};
|
||||||
|
|
||||||
while fcg.state.has_control_frames() {
|
while fcg.state.has_control_frames() {
|
||||||
@ -1409,6 +1410,7 @@ pub struct LLVMFunctionCodeGenerator<'ctx, 'a> {
|
|||||||
module: &'a Module<'ctx>,
|
module: &'a Module<'ctx>,
|
||||||
vmoffsets: VMOffsets,
|
vmoffsets: VMOffsets,
|
||||||
wasm_module: &'a WasmerCompilerModule,
|
wasm_module: &'a WasmerCompilerModule,
|
||||||
|
func_names: &'a SecondaryMap<FunctionIndex, String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
|
impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
|
||||||
@ -2270,7 +2272,7 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
|
|||||||
let func_index = FunctionIndex::from_u32(function_index);
|
let func_index = FunctionIndex::from_u32(function_index);
|
||||||
let sigindex = &module.functions[func_index];
|
let sigindex = &module.functions[func_index];
|
||||||
let func_type = &module.signatures[*sigindex];
|
let func_type = &module.signatures[*sigindex];
|
||||||
let func_name = &module.func_names[&func_index];
|
let func_name = &self.func_names[func_index];
|
||||||
let llvm_func_type = func_type_to_llvm(&self.context, &intrinsics, func_type);
|
let llvm_func_type = func_type_to_llvm(&self.context, &intrinsics, func_type);
|
||||||
|
|
||||||
let func = self.module.get_function(func_name);
|
let func = self.module.get_function(func_name);
|
||||||
|
Reference in New Issue
Block a user