From f222658dcb58c29a172bf84a31db454c227d40d1 Mon Sep 17 00:00:00 2001 From: Syrus Date: Thu, 16 Apr 2020 12:52:31 -0700 Subject: [PATCH] Added DynamicFunc::new method for non x86 architectures --- lib/runtime-core/src/typed_func.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/runtime-core/src/typed_func.rs b/lib/runtime-core/src/typed_func.rs index 3fa26604a..a6337bc58 100644 --- a/lib/runtime-core/src/typed_func.rs +++ b/lib/runtime-core/src/typed_func.rs @@ -344,6 +344,15 @@ impl<'a> DynamicFunc<'a> { } } } + + #[cfg(not(all(unix, target_arch = "x86_64")))] + pub fn new(_signature: Arc, _func: F) -> Self + where + F: Fn(&mut vm::Ctx, &[crate::types::Value]) -> Vec + 'static, + { + unimplemented!("The DynamicFunc::new is not yet implemented in your architecture."); + } + unsafe extern "C" fn enter_host_polymorphic_i( ctx: *const CallContext, args: *const u64, @@ -1015,6 +1024,7 @@ mod tests { }; } + #[cfg(all(unix, target_arch = "x86_64"))] #[test] fn test_many_new_dynamics() { use crate::types::{FuncSig, Type};