Rename WasmRuntime's get_name to get_func_name.
This commit is contained in:
@@ -152,7 +152,7 @@ pub fn translate_module(
|
||||
func.signature = runtime
|
||||
.get_signature(runtime.get_func_type(function_index))
|
||||
.clone();
|
||||
func.name = runtime.get_name(function_index);
|
||||
func.name = runtime.get_func_name(function_index);
|
||||
trans
|
||||
.translate_from_reader(parser.create_binary_reader(), &mut func, runtime)
|
||||
.map_err(|e| String::from(e.description()))?;
|
||||
|
||||
@@ -109,7 +109,7 @@ impl FuncEnvironment for DummyRuntime {
|
||||
// A real implementation would probably add a `vmctx` argument.
|
||||
// And maybe attempt some signature de-duplication.
|
||||
let signature = func.import_signature(self.signatures[sigidx].clone());
|
||||
let name = self.get_name(index);
|
||||
let name = self.get_func_name(index);
|
||||
func.import_function(ir::ExtFuncData { name, signature })
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ impl FuncEnvironment for DummyRuntime {
|
||||
}
|
||||
|
||||
impl WasmRuntime for DummyRuntime {
|
||||
fn get_name(&self, func_index: FunctionIndex) -> ir::FunctionName {
|
||||
fn get_func_name(&self, func_index: FunctionIndex) -> ir::FunctionName {
|
||||
ir::FunctionName::new(format!("wasm_0x{:x}", func_index))
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ pub trait FuncEnvironment {
|
||||
/// by the user, they are only for `cretonne-wasm` internal use.
|
||||
pub trait WasmRuntime: FuncEnvironment {
|
||||
/// Return the name for the given function index.
|
||||
fn get_name(&self, func_index: FunctionIndex) -> ir::FunctionName;
|
||||
fn get_func_name(&self, func_index: FunctionIndex) -> ir::FunctionName;
|
||||
|
||||
/// Declares a function signature to the runtime.
|
||||
fn declare_signature(&mut self, sig: &ir::Signature);
|
||||
|
||||
Reference in New Issue
Block a user