#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iterator>
#include <string>
#include <vector>
#include <sysio/vm/allocator.hpp>
#include <sysio/vm/stack_elem.hpp>
#include <sysio/vm/utils.hpp>
Go to the source code of this file.
◆ BACKEND_TEST_CASE
#define BACKEND_TEST_CASE |
( |
| name, |
|
|
| tags ) |
Value:
#define TEMPLATE_TEST_CASE(...)
Definition at line 59 of file utils.hpp.
59#define BACKEND_TEST_CASE(name, tags) \
60 TEMPLATE_TEST_CASE(name, tags, sysio::vm::interpreter)
◆ bit_cast()
template<typename
T , typename
U >
T bit_cast |
( |
const U & | u | ) |
|
Definition at line 35 of file utils.hpp.
35 {
36 static_assert(
sizeof(
T) ==
sizeof(
U),
"bitcast requires identical sizes.");
38 std::memcpy(&result, &u,
sizeof(
T));
39 return result;
40}
#define T(meth, val, expected)
◆ check_nan()
Definition at line 43 of file utils.hpp.
43 {
45 [](sysio::vm::i64_const_t){ return false; },
46 [](sysio::vm::f32_const_t
f) {
return std::isnan(
f.data.f); },
47 [](sysio::vm::f64_const_t
f) {
return std::isnan(
f.data.f); }}, *v);
48}
constexpr auto visit(Visitor &&vis, Variant &&var)
◆ get_wasm_allocator()
Definition at line 50 of file utils.hpp.
50 {
52 return &alloc;
53}