#include <execution_interface.hpp>
Definition at line 13 of file execution_interface.hpp.
◆ execution_interface() [1/2]
sysio::vm::execution_interface::execution_interface |
( |
char * | memory, |
|
|
operand_stack * | os ) |
|
inline |
◆ execution_interface() [2/2]
sysio::vm::execution_interface::execution_interface |
( |
char * | memory, |
|
|
operand_stack * | os ) |
|
inline |
◆ get_memory() [1/2]
void * sysio::vm::execution_interface::get_memory |
( |
| ) |
const |
|
inline |
◆ get_memory() [2/2]
void * sysio::vm::execution_interface::get_memory |
( |
| ) |
const |
|
inline |
◆ operand_from_back() [1/2]
const auto & sysio::vm::execution_interface::operand_from_back |
( |
std::size_t | index | ) |
const |
|
inline |
◆ operand_from_back() [2/2]
const auto & sysio::vm::execution_interface::operand_from_back |
( |
std::size_t | index | ) |
const |
|
inline |
◆ pop_operand() [1/2]
auto sysio::vm::execution_interface::pop_operand |
( |
| ) |
|
|
inline |
◆ pop_operand() [2/2]
auto sysio::vm::execution_interface::pop_operand |
( |
| ) |
|
|
inline |
◆ push_operand() [1/2]
void sysio::vm::execution_interface::push_operand |
( |
T && | op | ) |
|
|
inline |
◆ push_operand() [2/2]
void sysio::vm::execution_interface::push_operand |
( |
T && | op | ) |
|
|
inline |
◆ trim_operands() [1/2]
void sysio::vm::execution_interface::trim_operands |
( |
std::size_t | amt | ) |
|
|
inline |
◆ trim_operands() [2/2]
void sysio::vm::execution_interface::trim_operands |
( |
std::size_t | amt | ) |
|
|
inline |
◆ validate_null_terminated_pointer() [1/4]
void sysio::vm::execution_interface::validate_null_terminated_pointer |
( |
const void * | ptr | ) |
const |
|
inline |
Definition at line 43 of file execution_interface.hpp.
43 {
44 volatile auto check_addr = std::strlen(static_cast<const char*>(ptr));
46 }
void ignore_unused_variable_warning(T &...)
◆ validate_null_terminated_pointer() [2/4]
void sysio::vm::execution_interface::validate_null_terminated_pointer |
( |
const void * | ptr | ) |
const |
|
inline |
Definition at line 43 of file execution_interface.hpp.
43 {
44 volatile auto check_addr = std::strlen(static_cast<const char*>(ptr));
46 }
◆ validate_null_terminated_pointer() [3/4]
void * sysio::vm::execution_interface::validate_null_terminated_pointer |
( |
wasm_ptr_t | ptr | ) |
const |
|
inline |
Definition at line 37 of file execution_interface.hpp.
37 {
38 auto result =
memory + ptr;
40 return result;
41 }
void * validate_null_terminated_pointer(wasm_ptr_t ptr) const
◆ validate_null_terminated_pointer() [4/4]
void * sysio::vm::execution_interface::validate_null_terminated_pointer |
( |
wasm_ptr_t | ptr | ) |
const |
|
inline |
◆ validate_pointer() [1/4]
void sysio::vm::execution_interface::validate_pointer |
( |
const void * | ptr, |
|
|
wasm_size_t | len ) const |
|
inline |
Definition at line 31 of file execution_interface.hpp.
31 {
32 SYS_VM_ASSERT(
len <= std::numeric_limits<wasm_size_t>::max() / (
wasm_size_t)
sizeof(
T), wasm_interpreter_exception,
"length will overflow" );
33 volatile auto check_addr = *(
reinterpret_cast<const char*
>(ptr) + (
len *
sizeof(
T)) - 1);
35 }
std::uint32_t wasm_size_t
#define T(meth, val, expected)
#define SYS_VM_ASSERT(expr, exc_type, msg)
◆ validate_pointer() [2/4]
void sysio::vm::execution_interface::validate_pointer |
( |
const void * | ptr, |
|
|
wasm_size_t | len ) const |
|
inline |
Definition at line 31 of file execution_interface.hpp.
31 {
32 SYS_VM_ASSERT(
len <= std::numeric_limits<wasm_size_t>::max() / (
wasm_size_t)
sizeof(
T), wasm_interpreter_exception,
"length will overflow" );
33 volatile auto check_addr = *(
reinterpret_cast<const char*
>(ptr) + (
len *
sizeof(
T)) - 1);
35 }
◆ validate_pointer() [3/4]
Definition at line 24 of file execution_interface.hpp.
24 {
25 auto result =
memory + ptr;
27 return result;
28 }
void * validate_pointer(wasm_ptr_t ptr, wasm_size_t len) const
◆ validate_pointer() [4/4]
◆ memory
char * sysio::vm::execution_interface::memory |
◆ os
The documentation for this struct was generated from the following files: