update fmt

This commit is contained in:
NikVolf 2019-04-09 20:19:48 +03:00
parent a51413563e
commit e5bde5b0d7
13 changed files with 25 additions and 25 deletions

View File

@ -1,15 +1,15 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::alloc::rc::{Rc, Weak}; use crate::alloc::rc::{Rc, Weak};
use core::fmt;
use crate::host::Externals; use crate::host::Externals;
use crate::isa; use crate::isa;
use crate::module::ModuleInstance; use crate::module::ModuleInstance;
use parity_wasm::elements::Local;
use crate::runner::{check_function_args, Interpreter, InterpreterState}; use crate::runner::{check_function_args, Interpreter, InterpreterState};
use crate::types::ValueType; use crate::types::ValueType;
use crate::value::RuntimeValue; use crate::value::RuntimeValue;
use crate::{Signature, Trap}; use crate::{Signature, Trap};
use core::fmt;
use parity_wasm::elements::Local;
/// Reference to a function (See [`FuncInstance`] for details). /// Reference to a function (See [`FuncInstance`] for details).
/// ///

View File

@ -1,9 +1,9 @@
use crate::alloc::rc::Rc; use crate::alloc::rc::Rc;
use core::cell::Cell;
use parity_wasm::elements::ValueType as EValueType;
use crate::types::ValueType; use crate::types::ValueType;
use crate::value::RuntimeValue; use crate::value::RuntimeValue;
use crate::Error; use crate::Error;
use core::cell::Cell;
use parity_wasm::elements::ValueType as EValueType;
/// Reference to a global variable (See [`GlobalInstance`] for details). /// Reference to a global variable (See [`GlobalInstance`] for details).
/// ///

View File

@ -1,6 +1,6 @@
use core::any::TypeId;
use crate::value::{FromRuntimeValue, RuntimeValue}; use crate::value::{FromRuntimeValue, RuntimeValue};
use crate::{Trap, TrapKind}; use crate::{Trap, TrapKind};
use core::any::TypeId;
/// Wrapper around slice of [`RuntimeValue`] for using it /// Wrapper around slice of [`RuntimeValue`] for using it
/// as an argument list conveniently. /// as an argument list conveniently.

View File

@ -1,15 +1,15 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::alloc::rc::Rc; 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::cell::{Cell, RefCell};
use core::cmp; use core::cmp;
use core::fmt; use core::fmt;
use core::ops::Range; use core::ops::Range;
use core::u32; use core::u32;
use crate::memory_units::{Bytes, Pages, RoundUpTo};
use parity_wasm::elements::ResizableLimits; use parity_wasm::elements::ResizableLimits;
use crate::value::LittleEndianConvert;
use crate::Error;
/// Size of a page of [linear memory][`MemoryInstance`] - 64KiB. /// Size of a page of [linear memory][`MemoryInstance`] - 64KiB.
/// ///
@ -579,8 +579,8 @@ mod tests {
use super::{MemoryInstance, MemoryRef, LINEAR_MEMORY_PAGE_SIZE}; use super::{MemoryInstance, MemoryRef, LINEAR_MEMORY_PAGE_SIZE};
use crate::memory_units::Pages; use crate::memory_units::Pages;
use std::rc::Rc;
use crate::Error; use crate::Error;
use std::rc::Rc;
#[test] #[test]
fn alloc() { fn alloc() {

View File

@ -1,9 +1,9 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::alloc::rc::Rc; use crate::alloc::rc::Rc;
use crate::Trap;
use core::cell::RefCell; use core::cell::RefCell;
use core::fmt; use core::fmt;
use crate::Trap;
#[cfg(not(feature = "std"))] #[cfg(not(feature = "std"))]
use hashbrown::HashMap; use hashbrown::HashMap;
@ -11,17 +11,17 @@ use hashbrown::HashMap;
use std::collections::HashMap; use std::collections::HashMap;
use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX}; use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
use core::cell::Ref;
use crate::func::{FuncBody, FuncInstance, FuncRef}; use crate::func::{FuncBody, FuncInstance, FuncRef};
use crate::global::{GlobalInstance, GlobalRef}; use crate::global::{GlobalInstance, GlobalRef};
use crate::host::Externals; use crate::host::Externals;
use crate::imports::ImportResolver; use crate::imports::ImportResolver;
use crate::memory::MemoryRef; use crate::memory::MemoryRef;
use crate::memory_units::Pages; use crate::memory_units::Pages;
use parity_wasm::elements::{External, InitExpr, Instruction, Internal, ResizableLimits, Type};
use crate::table::TableRef; use crate::table::TableRef;
use crate::types::{GlobalDescriptor, MemoryDescriptor, TableDescriptor}; use crate::types::{GlobalDescriptor, MemoryDescriptor, TableDescriptor};
use crate::{Error, MemoryInstance, Module, RuntimeValue, Signature, TableInstance}; 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`]. /// Reference to a [`ModuleInstance`].
/// ///

View File

@ -1,9 +1,6 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX}; 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::func::{FuncInstance, FuncInstanceInternal, FuncRef};
use crate::host::Externals; use crate::host::Externals;
use crate::isa; use crate::isa;
@ -11,12 +8,15 @@ use crate::memory::MemoryRef;
use crate::memory_units::Pages; use crate::memory_units::Pages;
use crate::module::ModuleRef; use crate::module::ModuleRef;
use crate::nan_preserving_float::{F32, F64}; use crate::nan_preserving_float::{F32, F64};
use parity_wasm::elements::Local;
use crate::value::{ use crate::value::{
ArithmeticOps, ExtendInto, Float, Integer, LittleEndianConvert, RuntimeValue, TransmuteInto, ArithmeticOps, ExtendInto, Float, Integer, LittleEndianConvert, RuntimeValue, TransmuteInto,
TryTruncateInto, WrapInto, TryTruncateInto, WrapInto,
}; };
use crate::{Signature, Trap, TrapKind, ValueType}; 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. /// Maximum number of entries in value stack.
pub const DEFAULT_VALUE_STACK_LIMIT: usize = (1024 * 1024) / ::core::mem::size_of::<RuntimeValue>(); pub const DEFAULT_VALUE_STACK_LIMIT: usize = (1024 * 1024) / ::core::mem::size_of::<RuntimeValue>();

View File

@ -1,13 +1,13 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::alloc::rc::Rc; use crate::alloc::rc::Rc;
use crate::func::FuncRef;
use crate::module::check_limits;
use crate::Error;
use core::cell::RefCell; use core::cell::RefCell;
use core::fmt; use core::fmt;
use core::u32; use core::u32;
use crate::func::FuncRef;
use crate::module::check_limits;
use parity_wasm::elements::ResizableLimits; use parity_wasm::elements::ResizableLimits;
use crate::Error;
/// Reference to a table (See [`TableInstance`] for details). /// Reference to a table (See [`TableInstance`] for details).
/// ///

View File

@ -1,5 +1,5 @@
use wabt;
use crate::Module; use crate::Module;
use wabt;
mod host; mod host;
mod wasm; mod wasm;

View File

@ -1,10 +1,10 @@
use crate::memory_units::Pages; use crate::memory_units::Pages;
use std::fs::File;
use crate::{ use crate::{
Error, FuncRef, GlobalDescriptor, GlobalInstance, GlobalRef, ImportsBuilder, MemoryDescriptor, Error, FuncRef, GlobalDescriptor, GlobalInstance, GlobalRef, ImportsBuilder, MemoryDescriptor,
MemoryInstance, MemoryRef, Module, ModuleImportResolver, ModuleInstance, NopExternals, MemoryInstance, MemoryRef, Module, ModuleImportResolver, ModuleInstance, NopExternals,
RuntimeValue, Signature, TableDescriptor, TableInstance, TableRef, RuntimeValue, Signature, TableDescriptor, TableInstance, TableRef,
}; };
use std::fs::File;
struct Env { struct Env {
table_base: GlobalRef, table_base: GlobalRef,

View File

@ -1,9 +1,9 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::validation::Error;
use parity_wasm::elements::{ use parity_wasm::elements::{
BlockType, FunctionType, GlobalType, MemoryType, TableType, ValueType, BlockType, FunctionType, GlobalType, MemoryType, TableType, ValueType,
}; };
use crate::validation::Error;
#[derive(Default, Debug)] #[derive(Default, Debug)]
pub struct ModuleContext { pub struct ModuleContext {

View File

@ -1,9 +1,9 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX}; use crate::common::{DEFAULT_MEMORY_INDEX, DEFAULT_TABLE_INDEX};
use crate::validation::context::ModuleContext;
use core::u32; use core::u32;
use parity_wasm::elements::{BlockType, Func, FuncBody, Instruction, TableElementType, ValueType}; use parity_wasm::elements::{BlockType, Func, FuncBody, Instruction, TableElementType, ValueType};
use crate::validation::context::ModuleContext;
use crate::validation::util::Locals; use crate::validation::util::Locals;
use crate::validation::Error; use crate::validation::Error;

View File

@ -1,7 +1,7 @@
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::alloc::prelude::v1::*; use crate::alloc::prelude::v1::*;
use parity_wasm::elements::{Local, ValueType};
use crate::validation::Error; use crate::validation::Error;
use parity_wasm::elements::{Local, ValueType};
/// Locals are the concatenation of a slice of function parameters /// Locals are the concatenation of a slice of function parameters
/// with function declared local variables. /// with function declared local variables.

View File

@ -1,7 +1,7 @@
use core::{f32, i32, i64, u32, u64};
use crate::nan_preserving_float::{F32, F64}; use crate::nan_preserving_float::{F32, F64};
use crate::types::ValueType; use crate::types::ValueType;
use crate::TrapKind; use crate::TrapKind;
use core::{f32, i32, i64, u32, u64};
/// Error for `LittleEndianConvert` /// Error for `LittleEndianConvert`
#[derive(Debug)] #[derive(Debug)]