mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 22:25:40 +00:00
Fix warnings.
This commit is contained in:
parent
f8fe999015
commit
d8d39c309c
@ -1,9 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
use wasmer_runtime_core::{
|
||||
backend::{ProtectedCaller, FuncResolver},
|
||||
structures::Map,
|
||||
types::{FuncIndex, FuncSig, SigIndex},
|
||||
units::Pages,
|
||||
module::ModuleInfo,
|
||||
};
|
||||
use wasmparser::{Operator, Type as WpType};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,6 @@
|
||||
)))]
|
||||
compile_error!("This crate doesn't yet support compiling on operating systems other than linux and macos and architectures other than x86_64");
|
||||
|
||||
#[macro_use]
|
||||
extern crate dynasmrt;
|
||||
|
||||
#[macro_use]
|
||||
@ -27,23 +26,21 @@ use crate::codegen::{CodegenError, ModuleCodeGenerator};
|
||||
use crate::parse::LoadError;
|
||||
use std::ptr::NonNull;
|
||||
use wasmer_runtime_core::{
|
||||
backend::{sys::Memory, Backend, CacheGen, Compiler, FuncResolver, ProtectedCaller, Token, UserTrapper},
|
||||
backend::{sys::Memory, Backend, CacheGen, Compiler, FuncResolver, Token},
|
||||
cache::{Artifact, Error as CacheError},
|
||||
error::{CompileError, CompileResult, RuntimeResult},
|
||||
module::{ModuleInfo, ModuleInner, StringTable},
|
||||
structures::{Map, TypedIndex},
|
||||
error::{CompileError, CompileResult},
|
||||
module::{ModuleInfo, ModuleInner},
|
||||
types::{
|
||||
FuncIndex, FuncSig, GlobalIndex, LocalFuncIndex, MemoryIndex, SigIndex, TableIndex, Type,
|
||||
Value,
|
||||
LocalFuncIndex,
|
||||
},
|
||||
vm::{self, ImportBacking},
|
||||
vm,
|
||||
};
|
||||
|
||||
struct Placeholder;
|
||||
impl CacheGen for Placeholder {
|
||||
fn generate_cache(
|
||||
&self,
|
||||
module: &ModuleInner,
|
||||
_module: &ModuleInner,
|
||||
) -> Result<(Box<ModuleInfo>, Box<[u8]>, Memory), CacheError> {
|
||||
// unimplemented!()
|
||||
Err(CacheError::Unknown("the dynasm backend doesn't support caching yet".to_string()))
|
||||
|
@ -1,5 +1,4 @@
|
||||
use crate::codegen::{CodegenError, FunctionCodeGenerator, ModuleCodeGenerator};
|
||||
use std::sync::Arc;
|
||||
use wasmer_runtime_core::{
|
||||
backend::{Backend, ProtectedCaller, FuncResolver},
|
||||
module::{
|
||||
@ -15,7 +14,7 @@ use wasmer_runtime_core::{
|
||||
units::Pages,
|
||||
};
|
||||
use wasmparser::{
|
||||
BinaryReaderError, CodeSectionReader, Data, DataKind, Element, ElementKind, Export,
|
||||
BinaryReaderError, Data, DataKind, Element, ElementKind, Export,
|
||||
ExternalKind, FuncType, Import, ImportSectionEntryType, InitExpr, ModuleReader, Operator,
|
||||
SectionCode, Type as WpType,
|
||||
WasmDecoder,
|
||||
@ -308,7 +307,7 @@ pub fn read_module<
|
||||
mcg.check_precondition(&info)?;
|
||||
for i in 0..code_reader.get_count() {
|
||||
let item = code_reader.read()?;
|
||||
let mut fcg = mcg.next_function()?;
|
||||
let fcg = mcg.next_function()?;
|
||||
let sig = info
|
||||
.signatures
|
||||
.get(
|
||||
|
@ -73,7 +73,7 @@ pub fn call_protected<T>(f: impl FnOnce() -> T) -> RuntimeResult<T> {
|
||||
if signum != 0 {
|
||||
*jmp_buf = prev_jmp_buf;
|
||||
|
||||
let (faulting_addr, inst_ptr) = CAUGHT_ADDRESSES.with(|cell| cell.get());
|
||||
let (faulting_addr, _inst_ptr) = CAUGHT_ADDRESSES.with(|cell| cell.get());
|
||||
|
||||
let signal = match Signal::from_c_int(signum) {
|
||||
Ok(SIGFPE) => "floating-point exception",
|
||||
|
@ -144,15 +144,6 @@ impl ValueStack {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn peek(&self) -> Result<ValueInfo, CodegenError> {
|
||||
match self.values.last().cloned() {
|
||||
Some(x) => Ok(x),
|
||||
None => Err(CodegenError {
|
||||
message: "no value on top of stack",
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset_depth(&mut self, target_depth: usize) {
|
||||
self.values.truncate(target_depth);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user