Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
cnv Struct Reference
Inheritance diagram for cnv:
Collaboration diagram for cnv:

Public Member Functions

 SYS_VM_FROM_WASM (char *,(void *ptr))
 
 SYS_VM_FROM_WASM (const char *,(void *ptr))
 
 SYS_VM_FROM_WASM (float *,(void *ptr))
 
 SYS_VM_FROM_WASM (int &,(void *ptr))
 
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
 SYS_VM_FROM_WASM (char *,(void *ptr))
 
 SYS_VM_FROM_WASM (const char *,(void *ptr))
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
- Public Member Functions inherited from sysio::vm::type_converter< Host, Execution_Interface >
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
uint32_t to_wasm (bool &&value)
 
template<typename T >
no_match_t to_wasm (T &&)
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
template<typename T >
decltype(auto) as_value (const elem_type &val) const
 
template<typename T >
constexpr auto as_result (T &&val) const
 
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
uint32_t to_wasm (bool &&value)
 
template<typename T >
no_match_t to_wasm (T &&)
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
template<typename T >
decltype(auto) as_value (const elem_type &val) const
 
template<typename T >
constexpr auto as_result (T &&val) const
 
 running_context (Host_Type *host, const Execution_Interface &ei)
 
 running_context (Host_Type *host, Execution_Interface &&ei)
 
decltype(auto) get_host ()
 
- Public Member Functions inherited from sysio::vm::running_context< Host, execution_interface >
 running_context (Host *host, const execution_interface &ei)
 
 running_context (Host *host, execution_interface &&ei)
 
 running_context (Host *host, const execution_interface &ei)
 
 running_context (Host *host, execution_interface &&ei)
 
void * access (wasm_ptr_t addr=0) const
 
void * access (wasm_ptr_t addr=0) const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
decltype(auto) get_host ()
 
decltype(auto) get_host ()
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_null_terminated_pointer (T ptr) const
 
auto validate_null_terminated_pointer (T ptr) const
 
- Public Member Functions inherited from sysio::vm::type_converter< standalone_function_t >
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
uint32_t to_wasm (bool &&value)
 
no_match_t to_wasm (T &&)
 
uint32_t to_wasm (bool &&value)
 
no_match_t to_wasm (T &&)
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
decltype(auto) as_value (const elem_type &val) const
 
decltype(auto) as_value (const elem_type &val) const
 
constexpr auto as_result (T &&val) const
 
constexpr auto as_result (T &&val) const
 
 running_context (Host_Type *host, const execution_interface &ei)
 
 running_context (Host_Type *host, execution_interface &&ei)
 
decltype(auto) get_host ()
 
- Public Member Functions inherited from sysio::vm::running_context< standalone_function_t, execution_interface >
 running_context (standalone_function_t *host, const execution_interface &ei)
 
 running_context (standalone_function_t *host, execution_interface &&ei)
 
 running_context (standalone_function_t *host, const execution_interface &ei)
 
 running_context (standalone_function_t *host, execution_interface &&ei)
 
void * access (wasm_ptr_t addr=0) const
 
void * access (wasm_ptr_t addr=0) const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
decltype(auto) get_host ()
 
decltype(auto) get_host ()
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_null_terminated_pointer (T ptr) const
 
auto validate_null_terminated_pointer (T ptr) const
 
- Public Member Functions inherited from sysio::vm::type_converter< example_host_methods >
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
uint32_t to_wasm (bool &&value)
 
no_match_t to_wasm (T &&)
 
uint32_t to_wasm (bool &&value)
 
no_match_t to_wasm (T &&)
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
decltype(auto) as_value (const elem_type &val) const
 
decltype(auto) as_value (const elem_type &val) const
 
constexpr auto as_result (T &&val) const
 
constexpr auto as_result (T &&val) const
 
 running_context (Host_Type *host, const execution_interface &ei)
 
 running_context (Host_Type *host, execution_interface &&ei)
 
decltype(auto) get_host ()
 
- Public Member Functions inherited from sysio::vm::running_context< example_host_methods, execution_interface >
 running_context (example_host_methods *host, const execution_interface &ei)
 
 running_context (example_host_methods *host, execution_interface &&ei)
 
 running_context (example_host_methods *host, const execution_interface &ei)
 
 running_context (example_host_methods *host, execution_interface &&ei)
 
void * access (wasm_ptr_t addr=0) const
 
void * access (wasm_ptr_t addr=0) const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
decltype(auto) get_host ()
 
decltype(auto) get_host ()
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_null_terminated_pointer (T ptr) const
 
auto validate_null_terminated_pointer (T ptr) const
 

Additional Inherited Members

- Public Types inherited from sysio::vm::type_converter< Host, Execution_Interface >
using base_type = running_context<Host, Execution_Interface>
 
using elem_type = operand_stack_elem
 
- Public Types inherited from sysio::vm::running_context< Host, execution_interface >
using running_context_t
 
- Public Types inherited from sysio::vm::type_converter< standalone_function_t >
using base_type
 
using elem_type
 
- Public Types inherited from sysio::vm::running_context< standalone_function_t, execution_interface >
using running_context_t
 
- Public Types inherited from sysio::vm::type_converter< example_host_methods >
using base_type
 
using elem_type
 
- Public Types inherited from sysio::vm::running_context< example_host_methods, execution_interface >
using running_context_t
 
- Public Attributes inherited from sysio::vm::running_context< Host, execution_interface >
Host * host
 
execution_interface interface
 
- Public Attributes inherited from sysio::vm::running_context< standalone_function_t, execution_interface >
standalone_function_thost
 
execution_interface interface
 
- Public Attributes inherited from sysio::vm::running_context< example_host_methods, execution_interface >
example_host_methodshost
 
execution_interface interface
 

Detailed Description

Definition at line 76 of file preconditions_tests.cpp.

Member Function Documentation

◆ from_wasm() [1/2]

template<typename T >
auto sysio::vm::type_converter< Host, Execution_Interface >::from_wasm ( wasm_ptr_t ptr,
tag< T > = {} ) const -> std::enable_if_t< is_argument_proxy_type_v<T> && std::is_pointer_v<typename T::proxy_type>, T>
inline

Definition at line 97 of file host_function.hpp.

97 {}) const
98 -> std::enable_if_t< is_argument_proxy_type_v<T> &&
99 std::is_pointer_v<typename T::proxy_type>, T> {
100 auto p = this->template validate_pointer<typename T::pointee_type>(ptr, 1);
101 return {p};
102 }
const mie::Vuint & p
Definition bn.cpp:27
#define T(meth, val, expected)

◆ from_wasm() [2/2]

template<typename T >
auto sysio::vm::type_converter< Host, Execution_Interface >::from_wasm ( wasm_ptr_t ptr,
wasm_size_t len,
tag< T > = {} ) const -> std::enable_if_t<is_span_type_v<T>, T>
inline

Definition at line 82 of file host_function.hpp.

82 {}) const
83 -> std::enable_if_t<is_span_type_v<T>, T> {
84 auto p = this->template validate_pointer<typename T::value_type>(ptr, len);
85 return {static_cast<typename T::pointer>(p), len};
86 }
size_t len

◆ SYS_VM_FROM_WASM() [1/7]

cnv::SYS_VM_FROM_WASM ( bool ,
(uint32_t value)  )
inline

Definition at line 37 of file hello_driver.cpp.

37{ return value ? 1 : 0; }
#define value
Definition pkcs11.h:157

◆ SYS_VM_FROM_WASM() [2/7]

cnv::SYS_VM_FROM_WASM ( char * ,
(void *ptr)  )
inline

Definition at line 79 of file preconditions_tests.cpp.

79{ return static_cast<char*>(ptr); }

◆ SYS_VM_FROM_WASM() [3/7]

cnv::SYS_VM_FROM_WASM ( char * ,
(void *ptr)  )
inline

Definition at line 38 of file hello_driver.cpp.

38{ return static_cast<char*>(ptr); }

◆ SYS_VM_FROM_WASM() [4/7]

cnv::SYS_VM_FROM_WASM ( const char * ,
(void *ptr)  )
inline

Definition at line 80 of file preconditions_tests.cpp.

80{ return static_cast<char*>(ptr); }

◆ SYS_VM_FROM_WASM() [5/7]

cnv::SYS_VM_FROM_WASM ( const char * ,
(void *ptr)  )
inline

Definition at line 39 of file hello_driver.cpp.

39{ return static_cast<char*>(ptr); }

◆ SYS_VM_FROM_WASM() [6/7]

cnv::SYS_VM_FROM_WASM ( float * ,
(void *ptr)  )
inline

Definition at line 81 of file preconditions_tests.cpp.

81{ return static_cast<float*>(ptr); }

◆ SYS_VM_FROM_WASM() [7/7]

cnv::SYS_VM_FROM_WASM ( int & ,
(void *ptr)  )
inline

Definition at line 82 of file preconditions_tests.cpp.

82{ return *static_cast<int*>(ptr); }

The documentation for this struct was generated from the following files: