mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 13:18:20 +00:00
Fixed native compilation
This commit is contained in:
@@ -176,7 +176,7 @@ macro_rules! impl_native_traits {
|
||||
return Ok(results);
|
||||
}
|
||||
} else {
|
||||
/// Is a dynamic function
|
||||
// Is a dynamic function
|
||||
if !self.has_env {
|
||||
let ctx = self.vmctx as *mut VMDynamicFunctionContext<VMDynamicFunctionWithoutEnv>;
|
||||
let params_list = [ $( $x.to_native().to_value() ),* ];
|
||||
|
||||
@@ -36,6 +36,7 @@ pub trait NativeWasmType {
|
||||
fn to_binary(self) -> i128;
|
||||
|
||||
/// Convert self to a `Value`
|
||||
#[inline]
|
||||
fn to_value<T>(self) -> Value<T>
|
||||
where
|
||||
Self: std::marker::Sized,
|
||||
@@ -62,10 +63,12 @@ impl NativeWasmType for i32 {
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn to_binary(self) -> i128 {
|
||||
self as _
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_binary(bits: i128) -> Self {
|
||||
bits as _
|
||||
}
|
||||
@@ -84,10 +87,12 @@ impl NativeWasmType for i64 {
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn to_binary(self) -> i128 {
|
||||
self as _
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_binary(bits: i128) -> Self {
|
||||
bits as _
|
||||
}
|
||||
@@ -106,10 +111,12 @@ impl NativeWasmType for f32 {
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn to_binary(self) -> i128 {
|
||||
self.to_bits() as _
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_binary(bits: i128) -> Self {
|
||||
Self::from_bits(bits as _)
|
||||
}
|
||||
@@ -128,10 +135,12 @@ impl NativeWasmType for f64 {
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn to_binary(self) -> i128 {
|
||||
self.to_bits() as _
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn from_binary(bits: i128) -> Self {
|
||||
Self::from_bits(bits as _)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user