7#include <sysio/vm/allocator.hpp>
8#include <sysio/vm/guarded_ptr.hpp>
9#include <sysio/vm/opcodes.hpp>
10#include <sysio/vm/vector.hpp>
19namespace sysio {
namespace vm {
191 const char * error =
nullptr;
200 if (
imports[i].kind == external_kind::Function)
203 return number_of_imports;
213 return ((
opcode*)&code[0].code[0])[pc];
228 uint32_t index = std::numeric_limits<uint32_t>::max();
230 if (
exports[i].kind == external_kind::Function &&
exports[i].field_str.size() == str.size() &&
231 memcmp((
const char*)str.data(), (
const char*)
exports[i].field_str.raw(),
exports[i].field_str.size()) ==
254 for (
uint32_t i = 0; i < imported_functions_size; ++i) {
bip::allocator< T, pinnable_mapped_file::segment_manager > allocator
managed_vector< T, growable_allocator > guarded_vector
std::vector< uint8_t > wasm_code
bool operator==(const host_function &lhs, const func_type &rhs)
std::uint32_t wasm_size_t
unsigned __int64 uint64_t
guarded_vector< uint8_t > data
guarded_vector< uint32_t > elems
guarded_vector< uint8_t > field_str
guarded_vector< value_type > param_types
guarded_vector< local_entry > locals
std::size_t jit_code_offset
guarded_vector< uint8_t > module_str
guarded_vector< uint8_t > field_str
guarded_vector< name_assoc > namemap
uint32_t get_exported_function(const std::string_view str)
guarded_vector< uint32_t > functions
guarded_vector< uint32_t > type_aliases
guarded_vector< import_entry > imports
guarded_vector< uint32_t > fast_functions
guarded_vector< global_variable > globals
uint32_t get_function_locals_size(uint32_t index) const
guarded_vector< elem_segment > elements
uint32_t get_imported_functions_size() const
guarded_vector< uint32_t > import_functions
guarded_vector< export_entry > exports
guarded_vector< table_type > tables
uint32_t get_functions_size() const
guarded_vector< memory_type > memories
auto & get_opcode(uint32_t pc) const
auto & get_function_type(uint32_t index) const
opcode * get_function_pc(uint32_t fidx) const
growable_allocator allocator
uint32_t get_functions_total() const
guarded_vector< uint8_t > name
guarded_vector< indirect_name_assoc > * local_names
guarded_vector< name_assoc > * function_names
guarded_vector< uint8_t > * module_name
guarded_vector< uint32_t > table
#define SYS_VM_ASSERT(expr, exc_type, msg)
constexpr native_value(float arg)
constexpr native_value(uint32_t arg)
constexpr native_value(double arg)
constexpr native_value(uint64_t arg)