mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
Renamed *Defined into *Local for better clarity
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::config::LLVMConfig;
|
||||
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
||||
use wasm_common::entity::{EntityRef, PrimaryMap};
|
||||
use wasm_common::Features;
|
||||
use wasm_common::{DefinedFuncIndex, FuncIndex, FuncType};
|
||||
use wasm_common::{LocalFuncIndex, FuncIndex, FuncType};
|
||||
use wasmer_compiler::FunctionBodyData;
|
||||
use wasmer_compiler::Module;
|
||||
use wasmer_compiler::{Compilation, CompileError, CompiledFunction, Compiler};
|
||||
@@ -54,18 +54,18 @@ impl Compiler for LLVMCompiler {
|
||||
&self,
|
||||
module: &Module,
|
||||
_module_translation: &ModuleTranslationState,
|
||||
function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'_>>,
|
||||
function_body_inputs: PrimaryMap<LocalFuncIndex, FunctionBodyData<'_>>,
|
||||
) -> Result<Compilation, CompileError> {
|
||||
let functions = function_body_inputs
|
||||
.into_iter()
|
||||
.collect::<Vec<(DefinedFuncIndex, &FunctionBodyData<'_>)>>()
|
||||
.collect::<Vec<(LocalFuncIndex, &FunctionBodyData<'_>)>>()
|
||||
.par_iter()
|
||||
.map_init(FuncTranslator::new, |func_translator, (i, input)| {
|
||||
func_translator.translate(module, i, input, self.config())
|
||||
})
|
||||
.collect::<Result<Vec<_>, CompileError>>()?
|
||||
.into_iter()
|
||||
.collect::<PrimaryMap<DefinedFuncIndex, _>>();
|
||||
.collect::<PrimaryMap<LocalFuncIndex, _>>();
|
||||
|
||||
Ok(Compilation::new(functions))
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ use std::any::Any;
|
||||
use crate::config::LLVMConfig;
|
||||
use wasm_common::entity::SecondaryMap;
|
||||
use wasm_common::{
|
||||
DefinedFuncIndex, FuncIndex, FuncType, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex,
|
||||
LocalFuncIndex, FuncIndex, FuncType, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex,
|
||||
Type,
|
||||
};
|
||||
use wasmer_compiler::CompiledFunctionUnwindInfo;
|
||||
@@ -86,7 +86,7 @@ impl FuncTranslator {
|
||||
pub fn translate(
|
||||
&mut self,
|
||||
wasm_module: &WasmerCompilerModule,
|
||||
func_index: &DefinedFuncIndex,
|
||||
func_index: &LocalFuncIndex,
|
||||
function_body: &FunctionBodyData,
|
||||
config: &LLVMConfig,
|
||||
) -> Result<CompiledFunction, CompileError> {
|
||||
|
||||
Reference in New Issue
Block a user