Provide proper function index and name in the FrameInfo (#824)

* fix function index

* Add function name to JITFunctionTag

* Add ModuleSyncString.
This commit is contained in:
Yury Delendik
2020-01-16 12:36:51 -06:00
committed by GitHub
parent adcc047f4a
commit b2bfb98f1f
8 changed files with 63 additions and 12 deletions

View File

@@ -166,9 +166,16 @@ impl Compiler {
let body_len = compilation.get(i).body.len();
self.jit_function_ranges
.push((ptr as usize, ptr as usize + body_len));
let func_index = module.func_index(i);
let func_name = module
.func_names
.get(func_index)
.cloned()
.unwrap_or_else(Default::default);
let tag = jit_function_registry::JITFunctionTag {
module_id: module.name.clone(),
func_index: i.index(),
func_index: func_index.index(),
func_name,
};
jit_function_registry::register(ptr as usize, ptr as usize + body_len, tag);
}