Fix compilation error on Aarch64.

This commit is contained in:
losfair
2020-02-16 00:28:43 +08:00
parent 12373bb872
commit 5f4561e5ef

View File

@ -4,7 +4,7 @@ use crate::{
error::RuntimeError, error::RuntimeError,
export::{Context, Export, FuncPointer}, export::{Context, Export, FuncPointer},
import::IsExport, import::IsExport,
types::{FuncSig, NativeWasmType, Type, Value, WasmExternType}, types::{FuncSig, NativeWasmType, Type, WasmExternType},
vm, vm,
}; };
use std::{ use std::{
@ -246,9 +246,10 @@ where
#[cfg(all(unix, target_arch = "x86_64"))] #[cfg(all(unix, target_arch = "x86_64"))]
pub fn new_polymorphic<F>(signature: Arc<FuncSig>, func: F) -> Func<'a, Args, Rets, Host> pub fn new_polymorphic<F>(signature: Arc<FuncSig>, func: F) -> Func<'a, Args, Rets, Host>
where where
F: Fn(&mut vm::Ctx, &[Value]) -> Vec<Value> + 'static, F: Fn(&mut vm::Ctx, &[crate::types::Value]) -> Vec<crate::types::Value> + 'static,
{ {
use crate::trampoline_x64::*; use crate::trampoline_x64::*;
use crate::types::Value;
use std::convert::TryFrom; use std::convert::TryFrom;
struct PolymorphicContext { struct PolymorphicContext {