mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-31 04:39:28 +00:00
Move SourceLoc into compiler
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
use cranelift_codegen::{isa, Context};
|
||||
use wasm_common::SourceLoc;
|
||||
use wasmer_compiler::{FunctionAddressMap, FunctionBodyData, InstructionAddressMap};
|
||||
use wasmer_compiler::{FunctionAddressMap, FunctionBodyData, InstructionAddressMap, SourceLoc};
|
||||
|
||||
pub fn get_function_address_map<'data>(
|
||||
context: &Context,
|
||||
|
@ -15,12 +15,13 @@ use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
||||
use std::collections::HashMap;
|
||||
use wasm_common::entity::{EntityRef, PrimaryMap, SecondaryMap};
|
||||
use wasm_common::{
|
||||
DefinedFuncIndex, Features, FuncIndex, FuncType, MemoryIndex, SignatureIndex, SourceLoc,
|
||||
TableIndex,
|
||||
DefinedFuncIndex, Features, FuncIndex, FuncType, MemoryIndex, SignatureIndex, TableIndex,
|
||||
};
|
||||
use wasmer_compiler::CompileError;
|
||||
use wasmer_compiler::FunctionBodyData;
|
||||
use wasmer_compiler::{Compilation, CompiledFunction, Compiler, JumpTable, TrapInformation};
|
||||
use wasmer_compiler::{
|
||||
Compilation, CompiledFunction, Compiler, JumpTable, SourceLoc, TrapInformation,
|
||||
};
|
||||
use wasmer_compiler::{CompilerConfig, ModuleTranslationState, Target};
|
||||
use wasmer_compiler::{Relocation, RelocationTarget};
|
||||
use wasmer_runtime::TrapCode;
|
||||
|
@ -4,7 +4,8 @@
|
||||
use cranelift_codegen::ir;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use wasm_common::entity::PrimaryMap;
|
||||
use wasm_common::{DefinedFuncIndex, SourceLoc};
|
||||
use wasm_common::DefinedFuncIndex;
|
||||
use wasmer_compiler::SourceLoc;
|
||||
|
||||
/// Single source location to generated address mapping.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -1,9 +1,9 @@
|
||||
//! Data structures to provide transformation of the source
|
||||
// addresses of a WebAssembly module into the native code.
|
||||
|
||||
use crate::sourceloc::SourceLoc;
|
||||
use crate::std::vec::Vec;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use wasm_common::SourceLoc;
|
||||
|
||||
/// Single source location to generated address mapping.
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -48,6 +48,7 @@ mod trap;
|
||||
mod unwind;
|
||||
#[macro_use]
|
||||
mod translator;
|
||||
mod sourceloc;
|
||||
|
||||
pub use crate::address_map::{FunctionAddressMap, InstructionAddressMap};
|
||||
pub use crate::compiler::Compiler;
|
||||
@ -56,6 +57,7 @@ pub use crate::errors::CompileError;
|
||||
pub use crate::function::{Compilation, CompiledFunction, Functions};
|
||||
pub use crate::jump_table::{JumpTable, JumpTableOffsets};
|
||||
pub use crate::relocation::{Relocation, RelocationKind, RelocationTarget, Relocations};
|
||||
pub use crate::sourceloc::SourceLoc;
|
||||
pub use crate::translator::{
|
||||
to_wasm_error, translate_module, FunctionBodyData, ModuleEnvironment, ModuleTranslation,
|
||||
ModuleTranslationState, WasmError, WasmResult,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::sourceloc::SourceLoc;
|
||||
use crate::CodeOffset;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use wasm_common::SourceLoc;
|
||||
use wasmer_runtime::TrapCode;
|
||||
|
||||
/// Information about trap.
|
||||
|
@ -15,8 +15,8 @@ use std::cmp;
|
||||
use std::collections::BTreeMap;
|
||||
use std::sync::{Arc, RwLock};
|
||||
use wasm_common::entity::EntityRef;
|
||||
use wasm_common::{FuncIndex, SourceLoc};
|
||||
use wasmer_compiler::{FunctionAddressMap, TrapInformation};
|
||||
use wasm_common::FuncIndex;
|
||||
use wasmer_compiler::{FunctionAddressMap, SourceLoc, TrapInformation};
|
||||
use wasmer_runtime::Module;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
|
@ -29,7 +29,6 @@ mod features;
|
||||
mod indexes;
|
||||
mod native;
|
||||
mod r#ref;
|
||||
mod sourceloc;
|
||||
mod types;
|
||||
mod values;
|
||||
|
||||
@ -48,7 +47,6 @@ pub use crate::indexes::{
|
||||
};
|
||||
pub use crate::native::{Func, HostFunction, NativeWasmType, WasmTypeList, WithEnv, WithoutEnv};
|
||||
pub use crate::r#ref::{AnyRef, HostInfo, HostRef};
|
||||
pub use crate::sourceloc::SourceLoc;
|
||||
pub use crate::values::Value;
|
||||
pub use types::{
|
||||
ExportType, ExternType, FuncType, GlobalInit, GlobalType, ImportType, MemoryType, Mutability,
|
||||
|
Reference in New Issue
Block a user