Remove unneeded extern crate, macro_use, and tidy uses.

This commit is contained in:
Dan Gohman
2019-11-08 17:13:06 -08:00
parent 31f8f124f5
commit 061b453255
62 changed files with 126 additions and 262 deletions

View File

@@ -1,11 +1,13 @@
//! Support for a calling of an imported function.
use super::create_handle::create_handle;
use crate::r#ref::HostRef;
use crate::{Callable, FuncType, Store, Trap, Val};
use alloc::{boxed::Box, rc::Rc, string::ToString, vec::Vec};
use anyhow::Result;
use cranelift_codegen::ir::types;
use cranelift_codegen::ir::{InstBuilder, StackSlotData, StackSlotKind, TrapCode};
use cranelift_codegen::Context;
use cranelift_codegen::{binemit, ir, isa};
use core::cmp;
use cranelift_codegen::ir::{types, InstBuilder, StackSlotData, StackSlotKind, TrapCode};
use cranelift_codegen::{binemit, ir, isa, Context};
use cranelift_entity::{EntityRef, PrimaryMap};
use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
use cranelift_wasm::{DefinedFuncIndex, FuncIndex};
@@ -13,16 +15,6 @@ use wasmtime_environ::{CompiledFunction, Export, Module};
use wasmtime_jit::CodeMemory;
use wasmtime_runtime::{InstanceHandle, VMContext, VMFunctionBody};
use alloc::boxed::Box;
use alloc::rc::Rc;
use alloc::string::ToString;
use alloc::vec::Vec;
use core::cmp;
use crate::{Callable, FuncType, Store, Trap, Val};
use super::create_handle::create_handle;
struct TrampolineState {
func: Rc<dyn Callable + 'static>,
trap: Option<HostRef<Trap>>,