Run cargo fmt

This commit is contained in:
Mark McCaskey
2020-08-13 18:12:43 -07:00
parent 5049c543dc
commit 6e974b92cd
39 changed files with 77 additions and 77 deletions

View File

@@ -19,14 +19,14 @@ use cranelift_codegen::{binemit, Context};
#[cfg(feature = "unwind")]
use gimli::write::{Address, EhFrame, FrameTable};
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
use wasmer_types::entity::{EntityRef, PrimaryMap};
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
use wasmer_compiler::CompileError;
use wasmer_compiler::{CallingConvention, ModuleTranslationState, Target};
use wasmer_compiler::{
Compilation, CompileModuleInfo, CompiledFunction, CompiledFunctionFrameInfo,
CompiledFunctionUnwindInfo, Compiler, Dwarf, FunctionBody, FunctionBodyData, SectionIndex,
};
use wasmer_types::entity::{EntityRef, PrimaryMap};
use wasmer_types::{FunctionIndex, LocalFunctionIndex, SignatureIndex};
/// A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR,
/// optimizing it and then translating to assembly.

View File

@@ -1,9 +1,9 @@
use gimli::write::{Address, EndianVec, Result, Writer};
use gimli::{RunTimeEndian, SectionId};
use wasmer_types::entity::EntityRef;
use wasmer_types::LocalFunctionIndex;
use wasmer_compiler::{CustomSection, CustomSectionProtection, SectionBody};
use wasmer_compiler::{Endianness, Relocation, RelocationKind, RelocationTarget};
use wasmer_types::entity::EntityRef;
use wasmer_types::LocalFunctionIndex;
#[derive(Clone, Debug)]
pub struct WriterRelocate {

View File

@@ -12,10 +12,10 @@ use cranelift_codegen::ir::types::*;
use cranelift_codegen::ir::{AbiParam, ArgumentPurpose, Function, InstBuilder, Signature};
use cranelift_codegen::isa::TargetFrontendConfig;
use std::convert::TryFrom;
use wasmer_compiler::{WasmError, WasmResult};
use wasmer_types::entity::EntityRef;
use wasmer_types::entity::PrimaryMap;
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
use wasmer_compiler::{WasmError, WasmResult};
use wasmer_vm::VMBuiltinFunctionIndex;
use wasmer_vm::VMOffsets;
use wasmer_vm::{MemoryStyle, ModuleInfo, TableStyle};

View File

@@ -3,9 +3,9 @@
use crate::translator::{irlibcall_to_libcall, irreloc_to_relocationkind};
use cranelift_codegen::binemit;
use cranelift_codegen::ir::{self, ExternalName};
use wasmer_compiler::{JumpTable, Relocation, RelocationTarget, SourceLoc, TrapInformation};
use wasmer_types::entity::EntityRef;
use wasmer_types::{FunctionIndex, LocalFunctionIndex};
use wasmer_compiler::{JumpTable, Relocation, RelocationTarget, SourceLoc, TrapInformation};
use wasmer_vm::{ModuleInfo, TrapCode};
/// Implementation of a relocation sink that just saves all the information for later

View File

@@ -16,8 +16,8 @@ use std::cmp;
use std::mem;
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
use wasmer_types::FunctionType;
use wasmer_compiler::{CompileError, FunctionBody};
use wasmer_types::FunctionType;
use wasmer_vm::VMOffsets;
/// Create a trampoline for invoking a WebAssembly function.

View File

@@ -19,8 +19,8 @@ use cranelift_codegen::Context;
use cranelift_codegen::{binemit, ir};
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
use std::mem;
use wasmer_types::FunctionType;
use wasmer_compiler::{CompileError, FunctionBody};
use wasmer_types::FunctionType;
/// Create a trampoline for invoking a WebAssembly function.
pub fn make_trampoline_function_call(

View File

@@ -42,10 +42,10 @@ use cranelift_codegen::ir::{
use cranelift_codegen::packed_option::ReservedValue;
use cranelift_frontend::{FunctionBuilder, Variable};
use std::vec::Vec;
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
use wasmer_compiler::wasmparser::{MemoryImmediate, Operator};
use wasmer_compiler::{to_wasm_error, WasmResult};
use wasmer_compiler::{wasm_unsupported, ModuleTranslationState};
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
// Clippy warns about "flags: _" but its important to document that the flags field is ignored
#[cfg_attr(

View File

@@ -12,9 +12,9 @@ use cranelift_codegen::ir::immediates::Offset32;
use cranelift_codegen::ir::{self, InstBuilder};
use cranelift_codegen::isa::TargetFrontendConfig;
use cranelift_frontend::FunctionBuilder;
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
use wasmer_compiler::wasmparser::Operator;
use wasmer_compiler::WasmResult;
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
/// The value of a WebAssembly global variable.
#[derive(Clone, Copy)]

View File

@@ -13,8 +13,8 @@ use super::func_environ::{FuncEnvironment, GlobalVariable};
use crate::{HashMap, Occupied, Vacant};
use cranelift_codegen::ir::{self, Block, Inst, Value};
use std::vec::Vec;
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
use wasmer_compiler::WasmResult;
use wasmer_types::{FunctionIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex};
/// Information about the presence of an associated `else` for an `if`, or the
/// lack thereof.

View File

@@ -17,12 +17,12 @@ use cranelift_codegen::ir::{self, Block, InstBuilder, ValueLabel};
use cranelift_codegen::timing;
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
use tracing::info;
use wasmer_types::LocalFunctionIndex;
use wasmer_compiler::wasmparser;
use wasmer_compiler::{
to_wasm_error, wasm_unsupported, GenerateMiddlewareChain, MiddlewareBinaryReader,
ModuleTranslationState, WasmResult,
};
use wasmer_types::LocalFunctionIndex;
/// WebAssembly to Cranelift IR function translator.
///

View File

@@ -7,12 +7,12 @@ use cranelift_codegen::binemit::Reloc;
use cranelift_codegen::ir::{self, AbiParam};
use cranelift_codegen::isa::TargetFrontendConfig;
use cranelift_frontend::FunctionBuilder;
use wasmer_types::entity::{EntityRef, SecondaryMap};
use wasmer_types::{FunctionType, Type};
use wasmer_compiler::wasm_unsupported;
use wasmer_compiler::wasmparser;
use wasmer_compiler::{JumpTable, RelocationKind};
use wasmer_compiler::{WasmError, WasmResult};
use wasmer_types::entity::{EntityRef, SecondaryMap};
use wasmer_types::{FunctionType, Type};
use wasmer_vm::libcalls::LibCall;
/// Helper function translate a Function signature into Cranelift Ir