update fmt
This commit is contained in:
parent
a51413563e
commit
e5bde5b0d7
|
@ -1,15 +1,15 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::alloc::rc::{Rc, Weak};
|
||||
use core::fmt;
|
||||
use crate::host::Externals;
|
||||
use crate::isa;
|
||||
use crate::module::ModuleInstance;
|
||||
use parity_wasm::elements::Local;
|
||||
use crate::runner::{check_function_args, Interpreter, InterpreterState};
|
||||
use crate::types::ValueType;
|
||||
use crate::value::RuntimeValue;
|
||||
use crate::{Signature, Trap};
|
||||
use core::fmt;
|
||||
use parity_wasm::elements::Local;
|
||||
|
||||
/// Reference to a function (See [`FuncInstance`] for details).
|
||||
///
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::alloc::rc::Rc;
|
||||
use core::cell::Cell;
|
||||
use parity_wasm::elements::ValueType as EValueType;
|
||||
use crate::types::ValueType;
|
||||
use crate::value::RuntimeValue;
|
||||
use crate::Error;
|
||||
use core::cell::Cell;
|
||||
use parity_wasm::elements::ValueType as EValueType;
|
||||
|
||||
/// Reference to a global variable (See [`GlobalInstance`] for details).
|
||||
///
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use core::any::TypeId;
|
||||
use crate::value::{FromRuntimeValue, RuntimeValue};
|
||||
use crate::{Trap, TrapKind};
|
||||
use core::any::TypeId;
|
||||
|
||||
/// Wrapper around slice of [`RuntimeValue`] for using it
|
||||
/// as an argument list conveniently.
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::alloc::rc::Rc;
|
||||
use crate::memory_units::{Bytes, Pages, RoundUpTo};
|
||||
use crate::value::LittleEndianConvert;
|
||||
use crate::Error;
|
||||
use core::cell::{Cell, RefCell};
|
||||
use core::cmp;
|
||||
use core::fmt;
|
||||
use core::ops::Range;
|
||||
use core::u32;
|
||||
use crate::memory_units::{Bytes, Pages, RoundUpTo};
|
||||
use parity_wasm::elements::ResizableLimits;
|
||||
use crate::value::LittleEndianConvert;
|
||||
use crate::Error;
|
||||
|
||||
/// Size of a page of [linear memory][`MemoryInstance`] - 64KiB.
|
||||
///
|
||||
|
@ -579,8 +579,8 @@ mod tests {
|
|||
|
||||
use super::{MemoryInstance, MemoryRef, LINEAR_MEMORY_PAGE_SIZE};
|
||||
use crate::memory_units::Pages;
|
||||
use std::rc::Rc;
|
||||
use crate::Error;
|
||||
use std::rc::Rc;
|
||||
|
||||
#[test]
|
||||
fn alloc() {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::alloc::rc::Rc;
|
||||
use crate::Trap;
|
||||
use core::cell::RefCell;
|
||||
use core::fmt;
|
||||
use crate::Trap;
|
||||
|
||||
#[cfg(not(feature = "std"))]
|
||||
use hashbrown::HashMap;
|
||||
|
@ -11,17 +11,17 @@ use hashbrown::HashMap;
|
|||
use std::collections::HashMap;
|
||||
|
||||
use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
|
||||
use core::cell::Ref;
|
||||
use crate::func::{FuncBody, FuncInstance, FuncRef};
|
||||
use crate::global::{GlobalInstance, GlobalRef};
|
||||
use crate::host::Externals;
|
||||
use crate::imports::ImportResolver;
|
||||
use crate::memory::MemoryRef;
|
||||
use crate::memory_units::Pages;
|
||||
use parity_wasm::elements::{External, InitExpr, Instruction, Internal, ResizableLimits, Type};
|
||||
use crate::table::TableRef;
|
||||
use crate::types::{GlobalDescriptor, MemoryDescriptor, TableDescriptor};
|
||||
use crate::{Error, MemoryInstance, Module, RuntimeValue, Signature, TableInstance};
|
||||
use core::cell::Ref;
|
||||
use parity_wasm::elements::{External, InitExpr, Instruction, Internal, ResizableLimits, Type};
|
||||
|
||||
/// Reference to a [`ModuleInstance`].
|
||||
///
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
|
||||
use core::fmt;
|
||||
use core::ops;
|
||||
use core::{u32, usize};
|
||||
use crate::func::{FuncInstance, FuncInstanceInternal, FuncRef};
|
||||
use crate::host::Externals;
|
||||
use crate::isa;
|
||||
|
@ -11,12 +8,15 @@ use crate::memory::MemoryRef;
|
|||
use crate::memory_units::Pages;
|
||||
use crate::module::ModuleRef;
|
||||
use crate::nan_preserving_float::{F32, F64};
|
||||
use parity_wasm::elements::Local;
|
||||
use crate::value::{
|
||||
ArithmeticOps, ExtendInto, Float, Integer, LittleEndianConvert, RuntimeValue, TransmuteInto,
|
||||
TryTruncateInto, WrapInto,
|
||||
};
|
||||
use crate::{Signature, Trap, TrapKind, ValueType};
|
||||
use core::fmt;
|
||||
use core::ops;
|
||||
use core::{u32, usize};
|
||||
use parity_wasm::elements::Local;
|
||||
|
||||
/// Maximum number of entries in value stack.
|
||||
pub const DEFAULT_VALUE_STACK_LIMIT: usize = (1024 * 1024) / ::core::mem::size_of::<RuntimeValue>();
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::alloc::rc::Rc;
|
||||
use crate::func::FuncRef;
|
||||
use crate::module::check_limits;
|
||||
use crate::Error;
|
||||
use core::cell::RefCell;
|
||||
use core::fmt;
|
||||
use core::u32;
|
||||
use crate::func::FuncRef;
|
||||
use crate::module::check_limits;
|
||||
use parity_wasm::elements::ResizableLimits;
|
||||
use crate::Error;
|
||||
|
||||
/// Reference to a table (See [`TableInstance`] for details).
|
||||
///
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use wabt;
|
||||
use crate::Module;
|
||||
use wabt;
|
||||
|
||||
mod host;
|
||||
mod wasm;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use crate::memory_units::Pages;
|
||||
use std::fs::File;
|
||||
use crate::{
|
||||
Error, FuncRef, GlobalDescriptor, GlobalInstance, GlobalRef, ImportsBuilder, MemoryDescriptor,
|
||||
MemoryInstance, MemoryRef, Module, ModuleImportResolver, ModuleInstance, NopExternals,
|
||||
RuntimeValue, Signature, TableDescriptor, TableInstance, TableRef,
|
||||
};
|
||||
use std::fs::File;
|
||||
|
||||
struct Env {
|
||||
table_base: GlobalRef,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::validation::Error;
|
||||
use parity_wasm::elements::{
|
||||
BlockType, FunctionType, GlobalType, MemoryType, TableType, ValueType,
|
||||
};
|
||||
use crate::validation::Error;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct ModuleContext {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
|
||||
use crate::validation::context::ModuleContext;
|
||||
use core::u32;
|
||||
use parity_wasm::elements::{BlockType, Func, FuncBody, Instruction, TableElementType, ValueType};
|
||||
use crate::validation::context::ModuleContext;
|
||||
|
||||
use crate::validation::util::Locals;
|
||||
use crate::validation::Error;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#[allow(unused_imports)]
|
||||
use crate::alloc::prelude::v1::*;
|
||||
use parity_wasm::elements::{Local, ValueType};
|
||||
use crate::validation::Error;
|
||||
use parity_wasm::elements::{Local, ValueType};
|
||||
|
||||
/// Locals are the concatenation of a slice of function parameters
|
||||
/// with function declared local variables.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use core::{f32, i32, i64, u32, u64};
|
||||
use crate::nan_preserving_float::{F32, F64};
|
||||
use crate::types::ValueType;
|
||||
use crate::TrapKind;
|
||||
use core::{f32, i32, i64, u32, u64};
|
||||
|
||||
/// Error for `LittleEndianConvert`
|
||||
#[derive(Debug)]
|
||||
|
|
Loading…
Reference in New Issue