1#include <sysio/vm/backend.hpp>
17std::vector<uint8_t> unused_type_wasm = {
18 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60,
19 0x02, 0x7e, 0x7e, 0x00
28std::vector<uint8_t> param_16_wasm = {
29 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60,
30 0x02, 0x7e, 0x7e, 0x00, 0x03, 0x02, 0x01, 0x00, 0x0a, 0x04, 0x01, 0x02,
40std::vector<uint8_t> local_16_wasm = {
41 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
42 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x0a, 0x06, 0x01, 0x04, 0x01, 0x02,
68std::vector<uint8_t> stack_16_wasm = {
69 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60,
70 0x00, 0x00, 0x03, 0x02, 0x01, 0x00, 0x0a, 0x1b, 0x01, 0x19, 0x00, 0x42,
71 0x00, 0x42, 0x00, 0x1a, 0x41, 0x00, 0x41, 0x00, 0x1a, 0x1a, 0x1a, 0x0f,
72 0x02, 0x40, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x0f, 0x0b, 0x0b
81std::vector<uint8_t> mixed_16_wasm = {
82 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x05, 0x01, 0x60,
83 0x01, 0x7e, 0x00, 0x03, 0x02, 0x01, 0x00, 0x0a, 0x06, 0x01, 0x04, 0x01,
87constexpr auto lp = max_func_local_bytes_flags_t::params | max_func_local_bytes_flags_t::locals;
88constexpr auto ps = max_func_local_bytes_flags_t::params | max_func_local_bytes_flags_t::stack;
89constexpr auto ls = max_func_local_bytes_flags_t::locals | max_func_local_bytes_flags_t::stack;
90constexpr auto lps = max_func_local_bytes_flags_t::params | max_func_local_bytes_flags_t::locals | max_func_local_bytes_flags_t::stack;
92struct empty_options {};
93template<max_func_local_
bytes_flags_t F>
94struct empty_options_static_flags {
95 static constexpr auto max_func_local_bytes_flags = F;
97struct empty_options_dynamic_flags {
100template<
int N, max_func_local_
bytes_flags_t F>
101struct static_options {
102 static constexpr std::uint32_t max_func_local_bytes =
N;
103 static constexpr auto max_func_local_bytes_flags = F;
106struct static_options_empty_flags {
107 static constexpr std::uint32_t max_func_local_bytes =
N;
109struct dynamic_options {
110 std::uint32_t max_func_local_bytes;
113struct dynamic_options_empty_flags {
114 std::uint32_t max_func_local_bytes;
163 backend_t backend_unused(unused_type_wasm,
nullptr, empty_options_dynamic_flags{lps});
164 backend_t backend_param(param_16_wasm,
nullptr, empty_options_dynamic_flags{lps});
165 backend_t backend_local(local_16_wasm,
nullptr, empty_options_dynamic_flags{lps});
166 backend_t backend_stack(stack_16_wasm,
nullptr, empty_options_dynamic_flags{lps});
167 backend_t backend_mixed(mixed_16_wasm,
nullptr, empty_options_dynamic_flags{lps});
251 backend_t backend_unused(unused_type_wasm,
nullptr, dynamic_options{8, lp});
253 backend_t backend_param1(param_16_wasm,
nullptr, dynamic_options{16, lp});
254 backend_t backend_param2(param_16_wasm,
nullptr, dynamic_options{8, ls});
255 backend_t backend_param3(param_16_wasm,
nullptr, dynamic_options{16, ps});
256 backend_t backend_local1(local_16_wasm,
nullptr, dynamic_options{16, lp});
257 backend_t backend_local2(local_16_wasm,
nullptr, dynamic_options{16, ls});
258 backend_t backend_local3(local_16_wasm,
nullptr, dynamic_options{8, ps});
259 backend_t backend_stack1(stack_16_wasm,
nullptr, dynamic_options{8, lp});
260 backend_t backend_stack3(stack_16_wasm,
nullptr, dynamic_options{16, ps});
262 backend_t backend_mixed(mixed_16_wasm,
nullptr, dynamic_options{16, lp});
266 backend_t backend_param2(param_16_wasm,
nullptr, dynamic_options_empty_flags{8});
267 backend_t backend_local2(local_16_wasm,
nullptr, dynamic_options_empty_flags{16});
268 backend_t backend_stack2(stack_16_wasm,
nullptr, dynamic_options_empty_flags{16});
sysio::vm::backend< rhf_t > backend_t
#define CHECK_THROWS_AS(expr, exceptionType)
max_func_local_bytes_flags_t
#define BACKEND_TEST_CASE(name, tags)