Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::vm::running_context< Host_Type, Execution_Interface > Struct Template Reference

#include <host_function.hpp>

Collaboration diagram for sysio::vm::running_context< Host_Type, Execution_Interface >:

Public Types

using running_context_t = running_context<Execution_Interface>
 

Public Member Functions

 running_context (Host_Type *host, const Execution_Interface &ei)
 
 running_context (Host_Type *host, Execution_Interface &&ei)
 
void * access (wasm_ptr_t addr=0) const
 
Execution_Interface & get_interface ()
 
const Execution_Interface & get_interface () const
 
decltype(auto) get_host ()
 
template<typename T , typename U >
auto validate_pointer (U ptr, wasm_size_t len) const
 
template<typename T >
auto validate_null_terminated_pointer (T ptr) const
 
 running_context (Host_Type *host, const Execution_Interface &ei)
 
 running_context (Host_Type *host, Execution_Interface &&ei)
 
void * access (wasm_ptr_t addr=0) const
 
Execution_Interface & get_interface ()
 
const Execution_Interface & get_interface () const
 
decltype(auto) get_host ()
 
template<typename T , typename U >
auto validate_pointer (U ptr, wasm_size_t len) const
 
template<typename T >
auto validate_null_terminated_pointer (T ptr) const
 

Public Attributes

Host_Type * host
 
Execution_Interface interface
 

Detailed Description

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
struct sysio::vm::running_context< Host_Type, Execution_Interface >

Definition at line 31 of file host_function.hpp.

Member Typedef Documentation

◆ running_context_t

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
typedef running_context< Execution_Interface > sysio::vm::running_context< Host_Type, Execution_Interface >::running_context_t = running_context<Execution_Interface>

Definition at line 32 of file host_function.hpp.

Constructor & Destructor Documentation

◆ running_context() [1/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
sysio::vm::running_context< Host_Type, Execution_Interface >::running_context ( Host_Type * host,
const Execution_Interface & ei )
inlineexplicit

Definition at line 33 of file host_function.hpp.

33: host(host), interface(ei) {}
Execution_Interface interface

◆ running_context() [2/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
sysio::vm::running_context< Host_Type, Execution_Interface >::running_context ( Host_Type * host,
Execution_Interface && ei )
inlineexplicit

Definition at line 34 of file host_function.hpp.

34: host(host), interface(ei) {}

◆ running_context() [3/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
sysio::vm::running_context< Host_Type, Execution_Interface >::running_context ( Host_Type * host,
const Execution_Interface & ei )
inlineexplicit

Definition at line 33 of file host_function.hpp.

33: host(host), interface(ei) {}

◆ running_context() [4/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
sysio::vm::running_context< Host_Type, Execution_Interface >::running_context ( Host_Type * host,
Execution_Interface && ei )
inlineexplicit

Definition at line 34 of file host_function.hpp.

34: host(host), interface(ei) {}

Member Function Documentation

◆ access() [1/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
void * sysio::vm::running_context< Host_Type, Execution_Interface >::access ( wasm_ptr_t addr = 0) const
inline

Definition at line 36 of file host_function.hpp.

36{ return (char*)interface.get_memory() + addr; }
Here is the caller graph for this function:

◆ access() [2/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
void * sysio::vm::running_context< Host_Type, Execution_Interface >::access ( wasm_ptr_t addr = 0) const
inline

Definition at line 36 of file host_function.hpp.

36{ return (char*)interface.get_memory() + addr; }

◆ get_host() [1/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
decltype(auto) sysio::vm::running_context< Host_Type, Execution_Interface >::get_host ( )
inline

Definition at line 41 of file host_function.hpp.

41{ return *host; }

◆ get_host() [2/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
decltype(auto) sysio::vm::running_context< Host_Type, Execution_Interface >::get_host ( )
inline

Definition at line 41 of file host_function.hpp.

41{ return *host; }

◆ get_interface() [1/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
Execution_Interface & sysio::vm::running_context< Host_Type, Execution_Interface >::get_interface ( )
inline

Definition at line 38 of file host_function.hpp.

38{ return interface; }
Here is the caller graph for this function:

◆ get_interface() [2/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
Execution_Interface & sysio::vm::running_context< Host_Type, Execution_Interface >::get_interface ( )
inline

Definition at line 38 of file host_function.hpp.

38{ return interface; }

◆ get_interface() [3/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
const Execution_Interface & sysio::vm::running_context< Host_Type, Execution_Interface >::get_interface ( ) const
inline

Definition at line 39 of file host_function.hpp.

39{ return interface; }

◆ get_interface() [4/4]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
const Execution_Interface & sysio::vm::running_context< Host_Type, Execution_Interface >::get_interface ( ) const
inline

Definition at line 39 of file host_function.hpp.

39{ return interface; }

◆ validate_null_terminated_pointer() [1/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
template<typename T >
auto sysio::vm::running_context< Host_Type, Execution_Interface >::validate_null_terminated_pointer ( T ptr) const
inline

Definition at line 49 of file host_function.hpp.

49 {
50 return get_interface().validate_null_terminated_pointer(ptr);
51 }
Execution_Interface & get_interface()
Here is the call graph for this function:

◆ validate_null_terminated_pointer() [2/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
template<typename T >
auto sysio::vm::running_context< Host_Type, Execution_Interface >::validate_null_terminated_pointer ( T ptr) const
inline

Definition at line 49 of file host_function.hpp.

49 {
50 return get_interface().validate_null_terminated_pointer(ptr);
51 }
Here is the call graph for this function:

◆ validate_pointer() [1/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
template<typename T , typename U >
auto sysio::vm::running_context< Host_Type, Execution_Interface >::validate_pointer ( U ptr,
wasm_size_t len ) const
inline

Definition at line 44 of file host_function.hpp.

44 {
45 return get_interface().template validate_pointer<T>(ptr, len);
46 }
auto validate_pointer(U ptr, wasm_size_t len) const
size_t len
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_pointer() [2/2]

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
template<typename T , typename U >
auto sysio::vm::running_context< Host_Type, Execution_Interface >::validate_pointer ( U ptr,
wasm_size_t len ) const
inline

Definition at line 44 of file host_function.hpp.

44 {
45 return get_interface().template validate_pointer<T>(ptr, len);
46 }
Here is the call graph for this function:

Member Data Documentation

◆ host

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
Host_Type * sysio::vm::running_context< Host_Type, Execution_Interface >::host

Definition at line 53 of file host_function.hpp.

◆ interface

template<typename Host_Type = standalone_function_t, typename Execution_Interface = execution_interface>
Execution_Interface sysio::vm::running_context< Host_Type, Execution_Interface >::interface

Definition at line 54 of file host_function.hpp.


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