Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::vm::detail Namespace Reference

Classes

struct  dispatcher
 
struct  dispatcher< false, Ret >
 
struct  dispatcher< true, Ret >
 
struct  generate_all_subtuples_impl
 
struct  generate_all_subtuples_impl< std::tuple< T, Ts... > >
 
struct  generate_all_subtuples_impl< std::tuple<> >
 
struct  generate_subtuples_impl
 
struct  generate_subtuples_impl< std::tuple< T, Ts... > >
 
struct  host_invoker
 
struct  host_invoker< std::nullptr_t >
 
struct  host_type
 
struct  host_type< std::nullptr_t >
 
struct  index_inserter
 
struct  insert_type
 
struct  insert_type< N, I, Insert, Tuple< T, Ts... > >
 
struct  insert_type< N, N, Insert, Tuple< T, Ts... > >
 
struct  max_func_local_bytes_checker
 
struct  max_func_local_bytes_checker< Options, std::void_t< decltype(std::declval< Options >().max_func_local_bytes)> >
 
struct  max_func_local_bytes_stack_checker
 
struct  max_func_local_bytes_stack_checker< Options, std::enable_if_t<!max_func_local_bytes_checker< Options >::is_defined||get_max_func_local_bytes_no_stack_c< Options >(0)> >
 
struct  max_mutable_globals_checker
 
struct  max_mutable_globals_checker< Options, std::void_t< max_mutable_globals_t< Options > > >
 
struct  overloaded
 
struct  pack_from
 
struct  pack_from< Sz, N, I, Arg, Args... >
 
struct  pack_from< Sz, N, N, Arg, Args... >
 
struct  subtuple_impl
 
struct  subtuple_impl< N, I, std::tuple< T, Ts... > >
 
struct  subtuple_impl< N, N, std::tuple< T, Ts... > >
 
struct  sysio_max_nested_structures_checker
 
struct  sysio_max_nested_structures_checker< Options, std::void_t< decltype(std::declval< Options >().sysio_max_nested_structures)> >
 
struct  tuple_index
 
struct  tuple_trim
 
struct  tuple_trim< N, I, Tuple< T, Ts... > >
 
struct  tuple_trim< N, N, Tuple< T, Ts... > >
 
struct  type_converter
 
struct  type_converter< std::nullptr_t >
 
struct  unmanaged_base_member
 
union  variant_storage
 
union  variant_storage< T0 >
 
union  variant_storage< T0, T1 >
 
union  variant_storage< T0, T1, T2 >
 
union  variant_storage< T0, T1, T2, T3 >
 
union  variant_storage< T0, T1, T2, T3, T... >
 
class  vector
 
struct  wrapper_t
 

Typedefs

template<typename HF >
using host_type_t = typename host_type<HF>::type
 
template<typename HF >
using type_converter_t = typename type_converter<HF>::type
 
template<typename HF >
using host_invoker_t = typename host_invoker<HF>::type
 
template<bool Decay, typename F >
using get_types_t = decltype(get_types<Decay>(std::declval<F>()))
 
template<std::size_t N, typename... Args>
using pack_from_t = typename pack_from<sizeof...(Args), N, 0, Args...>::type
 
template<std::size_t N, typename F >
using parameters_from_impl_t = decltype(parameters_from_impl<N>(std::declval<F>()))
 
template<typename T >
using strip_tag
 
template<class TC , typename T >
using from_wasm_type_deducer_t = strip_tag<flatten_parameters_t<&TC::template from_wasm<T>>>
 
template<class TC , typename T >
using to_wasm_type_deducer_t = decltype(std::declval<TC>().to_wasm(std::declval<T>()))
 
template<typename Options >
using max_mutable_globals_t = decltype(std::declval<Options>().max_mutable_global_bytes)
 
template<size_t N, typename T >
using subtuple_t = typename subtuple_impl<N, 0, T>::type
 
template<typename T >
using generate_subtuples_t = decltype(generate_subtuples_impl<T>::value( std::make_index_sequence<std::tuple_size_v<T>>{} ))
 
template<size_t N, typename Insert , typename Tuple >
using insert_type_t = typename insert_type<N, 0, Insert, Tuple>::type
 
template<size_t N, typename Tuple , typename Indices >
using index_insert_t = decltype(index_inserter<N, 0, Tuple, Indices>::value())
 
template<typename Tuple , typename Indices >
using reorder_tuple_t = decltype(reorder_tuple<Tuple, Indices>(std::make_index_sequence<std::tuple_size_v<Indices>-1>{}))
 
template<std::size_t I, typename... Alternatives>
using get_alternative_t = std::tuple_element_t<I, std::tuple<Alternatives...>>
 

Functions

template<typename T >
constexpr std::true_type is_argument_proxy_type (argument_proxy< T >)
 
template<typename T , std::size_t LA>
constexpr std::true_type is_argument_proxy_type (argument_proxy< T, LA >)
 
template<typename T >
constexpr std::false_type is_argument_proxy_type (T)
 
template<typename T >
constexpr bool pass_type ()
 
template<typename >
constexpr bool is_callable_impl (...)
 
template<class... Ts>
 overloaded (Ts...) -> overloaded< Ts... >
 
template<typename T , typename U >
constexpr U && make_dependent (U &&u)
 
template<bool Decay, typename R , typename... Args>
constexpr auto get_types (R(Args...)) -> std::tuple< R, freestanding, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
 
template<bool Decay, typename R , typename Cls , typename... Args>
constexpr auto get_types (R(Cls::*)(Args...)) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
 
template<bool Decay, typename R , typename Cls , typename... Args>
constexpr auto get_types (R(Cls::*)(Args...)&) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
 
template<bool Decay, typename R , typename Cls , typename... Args>
constexpr auto get_types (R(Cls::*)(Args...)&&) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
 
template<bool Decay, typename R , typename Cls , typename... Args>
constexpr auto get_types (R(Cls::*)(Args...) const &) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
 
template<bool Decay, typename R , typename Cls , typename... Args>
constexpr auto get_types (R(Cls::*)(Args...) const &&) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
 
template<bool Decay, typename F >
constexpr auto get_types (F &&fn)
 
template<std::size_t N, typename R , typename... Args>
constexpr auto parameters_from_impl (R(Args...)) -> pack_from_t< N, Args... >
 
template<std::size_t N, typename R , typename Cls , typename... Args>
constexpr auto parameters_from_impl (R(Cls::*)(Args...)) -> pack_from_t< N, Args... >
 
template<std::size_t N, typename R , typename Cls , typename... Args>
constexpr auto parameters_from_impl (R(Cls::*)(Args...)&) -> pack_from_t< N, Args... >
 
template<std::size_t N, typename R , typename Cls , typename... Args>
constexpr auto parameters_from_impl (R(Cls::*)(Args...)&&) -> pack_from_t< N, Args... >
 
template<std::size_t N, typename R , typename Cls , typename... Args>
constexpr auto parameters_from_impl (R(Cls::*)(Args...) const &) -> pack_from_t< N, Args... >
 
template<std::size_t N, typename R , typename Cls , typename... Args>
constexpr auto parameters_from_impl (R(Cls::*)(Args...) const &&) -> pack_from_t< N, Args... >
 
template<std::size_t N, typename F >
constexpr auto parameters_from_impl (F &&fn)
 
template<typename Tuple , std::size_t... N>
std::tuple< std::tuple_element_t< N, Tuple >... > tuple_select (std::index_sequence< N... >)
 
template<std::size_t N, typename Type_Converter >
constexpr const auto & pop_value (Type_Converter &tc)
 
template<typename S , typename Type_Converter >
constexpr bool has_as_value ()
 
template<typename S , typename Type_Converter >
constexpr bool has_as_result ()
 
template<typename T , class Type_Converter >
constexpr std::size_t value_operand_size ()
 
template<typename Args , std::size_t I, class Type_Converter >
constexpr std::size_t total_operands ()
 
template<typename Args , typename S , std::size_t At, class Type_Converter , std::size_t... Is>
constexpr decltype(auto) create_value (Type_Converter &tc, std::index_sequence< Is... >)
 
template<typename S , typename Type_Converter >
constexpr std::size_t skip_amount ()
 
template<typename Args , std::size_t At, std::size_t Skip_Amt, class Type_Converter >
constexpr auto get_values (Type_Converter &tc)
 
template<typename Type_Converter , typename T >
constexpr auto resolve_result (Type_Converter &tc, T &&val)
 
template<bool Once, std::size_t Cnt, typename T , typename F >
constexpr void invoke_on_impl (F &&fn)
 
template<bool Once, std::size_t Cnt, typename T , typename F , typename Arg , typename... Args>
constexpr void invoke_on_impl (F &&fn, const Arg &arg, const Args &... args)
 
 PARSER_OPTION (max_func_local_bytes_flags, max_func_local_bytes_flags_t::locals|max_func_local_bytes_flags_t::stack, max_func_local_bytes_flags_t)
 
template<typename Options >
constexpr auto get_max_func_local_bytes_no_stack_c (int) -> std::enable_if_t< std::is_pointer_v< decltype(&Options::max_func_local_bytes_flags)>, bool >
 
template<typename Options >
constexpr auto get_max_func_local_bytes_no_stack_c (long) -> bool
 
 PARSER_OPTION (forbid_export_mutable_globals, false, bool)
 
 PARSER_OPTION (allow_code_after_function_end, false, bool)
 
 PARSER_OPTION (allow_u32_limits_flags, false, bool)
 
 PARSER_OPTION (allow_invalid_empty_local_set, false, bool)
 
 PARSER_OPTION (parse_custom_section_name, false, bool)
 
template<typename T >
constexpr std::true_type is_span_type (span< T >)
 
template<typename T >
constexpr std::false_type is_span_type (T)
 
template<typename Tuple >
constexpr auto generate_all_subtuples (Tuple &&tup)
 
template<size_t I, typename Tuple , typename Indices >
constexpr auto get_tuple_size_from_index ()
 
template<size_t I, typename Tuple >
constexpr auto get_tuple_size ()
 
template<typename Tuple , typename Indices , size_t... Is>
constexpr auto reorder_tuple (std::index_sequence< Is... >)
 
template<size_t N, size_t I, typename Tuple , typename Indices >
constexpr auto tuple_sort ()
 
template<int I, typename Storage >
constexpr decltype(auto) variant_storage_get (Storage &&val)
 

Variables

template<typename T >
constexpr bool is_tag_v = false
 
template<typename T >
constexpr bool is_tag_v< tag< T > > = true
 
template<typename... Ts>
constexpr std::size_t max_layout_size_v = std::max({sizeof(Ts)...})
 
template<typename... Ts>
constexpr std::size_t max_alignof_v = std::max({alignof(Ts)...})
 
template<typename T , typename... Alternatives>
constexpr bool is_valid_alternative_v = (... + (std::is_same_v<T, Alternatives>?1:0)) != 0
 
template<typename T , typename Alternative , typename... Alternatives>
constexpr std::size_t get_alternatives_index_v
 
template<typename T , typename Alternative >
constexpr std::size_t get_alternatives_index_v< T, Alternative > = 0
 

Typedef Documentation

◆ from_wasm_type_deducer_t

template<class TC , typename T >
using sysio::vm::detail::from_wasm_type_deducer_t = strip_tag<flatten_parameters_t<&TC::template from_wasm<T>>>

Definition at line 153 of file host_function.hpp.

◆ generate_subtuples_t

template<typename T >
using sysio::vm::detail::generate_subtuples_t = decltype(generate_subtuples_impl<T>::value( std::make_index_sequence<std::tuple_size_v<T>>{} ))

Definition at line 134 of file utils.hpp.

◆ get_alternative_t

template<std::size_t I, typename... Alternatives>
using sysio::vm::detail::get_alternative_t = std::tuple_element_t<I, std::tuple<Alternatives...>>

Definition at line 41 of file variant.hpp.

◆ get_types_t

template<bool Decay, typename F >
using sysio::vm::detail::get_types_t = decltype(get_types<Decay>(std::declval<F>()))

Definition at line 112 of file function_traits.hpp.

◆ host_invoker_t

template<typename HF >
using sysio::vm::detail::host_invoker_t = typename host_invoker<HF>::type

Definition at line 80 of file execution_context.hpp.

◆ host_type_t

template<typename HF >
using sysio::vm::detail::host_type_t = typename host_type<HF>::type

Definition at line 57 of file execution_context.hpp.

◆ index_insert_t

template<size_t N, typename Tuple , typename Indices >
using sysio::vm::detail::index_insert_t = decltype(index_inserter<N, 0, Tuple, Indices>::value())

Definition at line 213 of file utils.hpp.

◆ insert_type_t

template<size_t N, typename Insert , typename Tuple >
using sysio::vm::detail::insert_type_t = typename insert_type<N, 0, Insert, Tuple>::type

Definition at line 192 of file utils.hpp.

◆ max_mutable_globals_t

template<typename Options >
using sysio::vm::detail::max_mutable_globals_t = decltype(std::declval<Options>().max_mutable_global_bytes)

Definition at line 43 of file parser.hpp.

◆ pack_from_t

template<std::size_t N, typename... Args>
using sysio::vm::detail::pack_from_t = typename pack_from<sizeof...(Args), N, 0, Args...>::type

Definition at line 129 of file function_traits.hpp.

◆ parameters_from_impl_t

template<std::size_t N, typename F >
using sysio::vm::detail::parameters_from_impl_t = decltype(parameters_from_impl<N>(std::declval<F>()))

Definition at line 154 of file function_traits.hpp.

◆ reorder_tuple_t

template<typename Tuple , typename Indices >
using sysio::vm::detail::reorder_tuple_t = decltype(reorder_tuple<Tuple, Indices>(std::make_index_sequence<std::tuple_size_v<Indices>-1>{}))

Definition at line 222 of file utils.hpp.

◆ strip_tag

template<typename T >
using sysio::vm::detail::strip_tag
Initial value:
std::conditional_t<is_tag_v<std::tuple_element_t<std::tuple_size_v<T> - 1, T>>,
decltype(tuple_select<T>(std::make_index_sequence<std::tuple_size_v<T> - 1>())),
T>
#define T(meth, val, expected)

Definition at line 148 of file host_function.hpp.

◆ subtuple_t

template<size_t N, typename T >
using sysio::vm::detail::subtuple_t = typename subtuple_impl<N, 0, T>::type

Definition at line 120 of file utils.hpp.

◆ to_wasm_type_deducer_t

template<class TC , typename T >
using sysio::vm::detail::to_wasm_type_deducer_t = decltype(std::declval<TC>().to_wasm(std::declval<T>()))

Definition at line 155 of file host_function.hpp.

◆ type_converter_t

template<typename HF >
using sysio::vm::detail::type_converter_t = typename type_converter<HF>::type

Definition at line 69 of file execution_context.hpp.

Function Documentation

◆ create_value()

template<typename Args , typename S , std::size_t At, class Type_Converter , std::size_t... Is>
decltype(auto) sysio::vm::detail::create_value ( Type_Converter & tc,
std::index_sequence< Is... >  )
inlineconstexpr

Definition at line 204 of file host_function.hpp.

204 {
205 constexpr std::size_t offset = total_operands_v<Args, Type_Converter> - 1;
206 if constexpr (has_from_wasm_v<S, Type_Converter>) {
208 return tc.template from_wasm<S>(tc.template as_value<std::tuple_element_t<Is, arg_types>>(pop_value<offset - (At + Is)>(tc))...);
209 } else {
210 static_assert(has_as_value<S, Type_Converter>(), "no type conversion found for type, define a from_wasm for this type");
211 return tc.template as_value<S>(pop_value<offset - At>(tc));
212 }
213 }
strip_tag< flatten_parameters_t<&TC::template from_wasm< T > > > from_wasm_type_deducer_t
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_all_subtuples()

template<typename Tuple >
auto sysio::vm::detail::generate_all_subtuples ( Tuple && tup)
constexpr

Definition at line 151 of file utils.hpp.

151 {
152 return std::declval<typename generate_all_subtuples_impl<Tuple>::type>();
153 }

◆ get_max_func_local_bytes_no_stack_c() [1/2]

template<typename Options >
auto sysio::vm::detail::get_max_func_local_bytes_no_stack_c ( int ) -> std::enable_if_t<std::is_pointer_v<decltype(&Options::max_func_local_bytes_flags)>, bool>
constexpr

Definition at line 122 of file parser.hpp.

123 { return (Options::max_func_local_bytes_flags & max_func_local_bytes_flags_t::stack) == (max_func_local_bytes_flags_t)0; }
max_func_local_bytes_flags_t
Definition options.hpp:7

◆ get_max_func_local_bytes_no_stack_c() [2/2]

template<typename Options >
auto sysio::vm::detail::get_max_func_local_bytes_no_stack_c ( long ) -> bool
constexpr

Definition at line 125 of file parser.hpp.

125{ return false; }

◆ get_tuple_size()

template<size_t I, typename Tuple >
auto sysio::vm::detail::get_tuple_size ( )
constexpr

Definition at line 184 of file utils.hpp.

184 {
185 if constexpr (I >= std::tuple_size_v<Tuple>)
186 return -1;
187 else
188 return std::tuple_size_v<std::tuple_element_t<I, Tuple>>;
189 }

◆ get_tuple_size_from_index()

template<size_t I, typename Tuple , typename Indices >
auto sysio::vm::detail::get_tuple_size_from_index ( )
constexpr

Definition at line 176 of file utils.hpp.

176 {
177 if constexpr (I >= std::tuple_size_v<Tuple>)
178 return -1;
179 else
180 return std::tuple_size_v<std::tuple_element_t<std::tuple_element_t<I, Indices>::value, Tuple>>;
181 }
Here is the caller graph for this function:

◆ get_types() [1/7]

template<bool Decay, typename F >
auto sysio::vm::detail::get_types ( F && fn)
constexpr

Definition at line 104 of file function_traits.hpp.

104 {
105 if constexpr (is_callable_v<decltype(fn)>)
106 return get_types<Decay>(&F::operator());
107 else
108 return get_types<Decay>(fn);
109 }
Here is the call graph for this function:

◆ get_types() [2/7]

template<bool Decay, typename R , typename... Args>
auto sysio::vm::detail::get_types ( R(Args...) ) -> std::tuple< R, freestanding, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
constexpr
Here is the caller graph for this function:

◆ get_types() [3/7]

template<bool Decay, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::get_types ( R(Cls::*  )(Args...) const &&) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
constexpr

◆ get_types() [4/7]

template<bool Decay, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::get_types ( R(Cls::*  )(Args...) const &) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
constexpr

◆ get_types() [5/7]

template<bool Decay, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::get_types ( R(Cls::*  )(Args...)&&) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
constexpr

◆ get_types() [6/7]

template<bool Decay, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::get_types ( R(Cls::*  )(Args...)&) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
constexpr

◆ get_types() [7/7]

template<bool Decay, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::get_types ( R(Cls::*  )(Args...)) -> std::tuple< R, Cls, std::tuple< std::conditional_t< Decay, std::decay_t< Args >, Args >... > >
constexpr

◆ get_values()

template<typename Args , std::size_t At, std::size_t Skip_Amt, class Type_Converter >
auto sysio::vm::detail::get_values ( Type_Converter & tc)
inlineconstexpr

Definition at line 225 of file host_function.hpp.

225 {
226 if constexpr (At >= std::tuple_size_v<Args>)
227 return std::tuple<>{};
228 else {
229 using source_t = std::tuple_element_t<At, Args>;
230 constexpr std::size_t skip_amt = skip_amount<source_t, Type_Converter>();
231 using converted_t = decltype(create_value<Args, source_t, Skip_Amt>(tc, std::make_index_sequence<skip_amt>{}));
232 auto tail = get_values<Args, At+1, Skip_Amt + skip_amt>(tc);
233 return std::tuple_cat(std::tuple<converted_t>(create_value<Args, source_t, Skip_Amt>(tc, std::make_index_sequence<skip_amt>{})),
234 std::move(tail));
235 }
236 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_as_result()

template<typename S , typename Type_Converter >
bool sysio::vm::detail::has_as_result ( )
constexpr

Definition at line 167 of file host_function.hpp.

167 {
168 return !std::is_same_v<no_match_t, std::decay_t<decltype(
169 std::declval<Type_Converter>().template as_result<S>(std::declval<S&&>()))>>;
170 }

◆ has_as_value()

template<typename S , typename Type_Converter >
bool sysio::vm::detail::has_as_value ( )
constexpr

Definition at line 161 of file host_function.hpp.

161 {
162 return !std::is_same_v<no_match_t, std::decay_t<decltype(
163 std::declval<Type_Converter>().template as_value<S>(pop_value<0>(std::declval<Type_Converter&>())))>>;
164 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ invoke_on_impl() [1/2]

template<bool Once, std::size_t Cnt, typename T , typename F >
void sysio::vm::detail::invoke_on_impl ( F && fn)
inlineconstexpr

Definition at line 248 of file host_function.hpp.

248 {
249 if constexpr (Once && Cnt == 0) {
250 std::invoke(fn);
251 }
252 }
Here is the caller graph for this function:

◆ invoke_on_impl() [2/2]

template<bool Once, std::size_t Cnt, typename T , typename F , typename Arg , typename... Args>
void sysio::vm::detail::invoke_on_impl ( F && fn,
const Arg & arg,
const Args &... args )
inlineconstexpr

Definition at line 255 of file host_function.hpp.

255 {
256 if constexpr (Once) {
257 if constexpr (Cnt == 0)
258 std::invoke(fn, arg, args...);
259 } else {
260 if constexpr (std::is_same_v<T, Arg> || std::is_same_v<T, invoke_on_all_t>)
261 std::invoke(fn, arg, args...);
262 invoke_on_impl<Once, Cnt+1, T>(std::forward<F>(fn), args...);
263 }
264 }
Here is the call graph for this function:

◆ is_argument_proxy_type() [1/3]

template<typename T >
std::true_type sysio::vm::detail::is_argument_proxy_type ( argument_proxy< T > )
inlineconstexpr

◆ is_argument_proxy_type() [2/3]

template<typename T , std::size_t LA>
std::true_type sysio::vm::detail::is_argument_proxy_type ( argument_proxy< T, LA > )
inlineconstexpr

◆ is_argument_proxy_type() [3/3]

template<typename T >
std::false_type sysio::vm::detail::is_argument_proxy_type ( T )
inlineconstexpr

◆ is_callable_impl()

template<typename >
bool sysio::vm::detail::is_callable_impl ( ...)
constexpr

Definition at line 57 of file function_traits.hpp.

57 {
58 return false;
59 }

◆ is_span_type() [1/2]

template<typename T >
std::true_type sysio::vm::detail::is_span_type ( span< T > )
constexpr

Definition at line 102 of file span.hpp.

102{ return {}; }

◆ is_span_type() [2/2]

template<typename T >
std::false_type sysio::vm::detail::is_span_type ( T )
constexpr

Definition at line 104 of file span.hpp.

104{ return {}; }

◆ make_dependent()

template<typename T , typename U >
U && sysio::vm::detail::make_dependent ( U && u)
inlineconstexpr

Definition at line 72 of file function_traits.hpp.

72{ return static_cast<U&&>(u); }
Definition dtoa.c:306

◆ overloaded()

template<class... Ts>
sysio::vm::detail::overloaded ( Ts... ) -> overloaded< Ts... >

◆ parameters_from_impl() [1/7]

template<std::size_t N, typename F >
auto sysio::vm::detail::parameters_from_impl ( F && fn)
constexpr

Definition at line 146 of file function_traits.hpp.

146 {
147 if constexpr (is_callable_v<decltype(fn)>)
148 return parameters_from_impl<N>(&F::operator());
149 else
150 return parameters_from_impl<N>(fn);
151 }
Here is the call graph for this function:

◆ parameters_from_impl() [2/7]

template<std::size_t N, typename R , typename... Args>
auto sysio::vm::detail::parameters_from_impl ( R(Args...) ) -> pack_from_t< N, Args... >
constexpr
Here is the caller graph for this function:

◆ parameters_from_impl() [3/7]

template<std::size_t N, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::parameters_from_impl ( R(Cls::*  )(Args...) const &&) -> pack_from_t< N, Args... >
constexpr

◆ parameters_from_impl() [4/7]

template<std::size_t N, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::parameters_from_impl ( R(Cls::*  )(Args...) const &) -> pack_from_t< N, Args... >
constexpr

◆ parameters_from_impl() [5/7]

template<std::size_t N, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::parameters_from_impl ( R(Cls::*  )(Args...)&&) -> pack_from_t< N, Args... >
constexpr

◆ parameters_from_impl() [6/7]

template<std::size_t N, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::parameters_from_impl ( R(Cls::*  )(Args...)&) -> pack_from_t< N, Args... >
constexpr

◆ parameters_from_impl() [7/7]

template<std::size_t N, typename R , typename Cls , typename... Args>
auto sysio::vm::detail::parameters_from_impl ( R(Cls::*  )(Args...)) -> pack_from_t< N, Args... >
constexpr

◆ PARSER_OPTION() [1/6]

sysio::vm::detail::PARSER_OPTION ( allow_code_after_function_end ,
false ,
bool  )

◆ PARSER_OPTION() [2/6]

sysio::vm::detail::PARSER_OPTION ( allow_invalid_empty_local_set ,
false ,
bool  )

◆ PARSER_OPTION() [3/6]

sysio::vm::detail::PARSER_OPTION ( allow_u32_limits_flags ,
false ,
bool  )

◆ PARSER_OPTION() [4/6]

sysio::vm::detail::PARSER_OPTION ( forbid_export_mutable_globals ,
false ,
bool  )

◆ PARSER_OPTION() [5/6]

sysio::vm::detail::PARSER_OPTION ( max_func_local_bytes_flags ,
max_func_local_bytes_flags_t::locals|max_func_local_bytes_flags_t::stack ,
max_func_local_bytes_flags_t  )

◆ PARSER_OPTION() [6/6]

sysio::vm::detail::PARSER_OPTION ( parse_custom_section_name ,
false ,
bool  )

◆ pass_type()

template<typename T >
bool sysio::vm::detail::pass_type ( )
constexpr

Definition at line 54 of file function_traits.hpp.

54{ return true; }

◆ pop_value()

template<std::size_t N, typename Type_Converter >
const auto & sysio::vm::detail::pop_value ( Type_Converter & tc)
inlineconstexpr

Definition at line 158 of file host_function.hpp.

158{ return tc.get_interface().operand_from_back(N); }
const int N
Definition quantize.cpp:54
Here is the caller graph for this function:

◆ reorder_tuple()

template<typename Tuple , typename Indices , size_t... Is>
auto sysio::vm::detail::reorder_tuple ( std::index_sequence< Is... > )
constexpr

Definition at line 216 of file utils.hpp.

216 {
217 static_assert(std::tuple_size_v<Tuple> == std::tuple_size_v<Indices>);
218 return std::tuple<std::tuple_element_t<std::tuple_element_t<Is, Indices>::value, Tuple>...>();
219 }

◆ resolve_result()

template<typename Type_Converter , typename T >
auto sysio::vm::detail::resolve_result ( Type_Converter & tc,
T && val )
constexpr

Definition at line 239 of file host_function.hpp.

239 {
240 if constexpr (has_to_wasm_v<T, Type_Converter>) {
241 return tc.as_result(tc.to_wasm(static_cast<T&&>(val)));
242 } else {
243 return tc.as_result(static_cast<T&&>(val));
244 }
245 }
Here is the caller graph for this function:

◆ skip_amount()

template<typename S , typename Type_Converter >
std::size_t sysio::vm::detail::skip_amount ( )
inlineconstexpr

Definition at line 216 of file host_function.hpp.

216 {
217 if constexpr (has_as_value<S, Type_Converter>()) {
218 return 1;
219 } else {
220 return std::tuple_size_v<from_wasm_type_deducer_t<Type_Converter, S>>;
221 }
222 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ total_operands()

template<typename Args , std::size_t I, class Type_Converter >
std::size_t sysio::vm::detail::total_operands ( )
inlineconstexpr

Definition at line 184 of file host_function.hpp.

184 {
185 if constexpr (I >= std::tuple_size_v<Args>)
186 return 0;
187 else {
188 constexpr std::size_t sz = value_operand_size_v<std::tuple_element_t<I, Args>, Type_Converter>;
189 return sz + total_operands<Args, I+1, Type_Converter>();
190 }
191 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tuple_select()

template<typename Tuple , std::size_t... N>
std::tuple< std::tuple_element_t< N, Tuple >... > sysio::vm::detail::tuple_select ( std::index_sequence< N... > )

◆ tuple_sort()

template<size_t N, size_t I, typename Tuple , typename Indices >
auto sysio::vm::detail::tuple_sort ( )
constexpr

Definition at line 226 of file utils.hpp.

226 {
227 if constexpr (N == I)
229 else
230 return tuple_sort<N, I+1, Tuple, index_insert_t<I, Tuple, Indices>>();
231 }
decltype(index_inserter< N, 0, Tuple, Indices >::value()) index_insert_t
Definition utils.hpp:213
decltype(reorder_tuple< Tuple, Indices >(std::make_index_sequence< std::tuple_size_v< Indices > -1 >{})) reorder_tuple_t
Definition utils.hpp:222
Here is the call graph for this function:
Here is the caller graph for this function:

◆ value_operand_size()

template<typename T , class Type_Converter >
std::size_t sysio::vm::detail::value_operand_size ( )
inlineconstexpr

Definition at line 173 of file host_function.hpp.

173 {
174 if constexpr (has_as_value<T, Type_Converter>())
175 return 1;
176 else
177 return std::tuple_size_v<from_wasm_type_deducer_t<Type_Converter, T>>;
178 }
Here is the call graph for this function:

◆ variant_storage_get()

template<int I, typename Storage >
decltype(auto) sysio::vm::detail::variant_storage_get ( Storage && val)
constexpr

Definition at line 140 of file variant.hpp.

140 {
141 if constexpr (I == 0) {
142 return (static_cast<Storage&&>(val)._t0);
143 } else if constexpr (I == 1) {
144 return (static_cast<Storage&&>(val)._t1);
145 } else if constexpr (I == 2) {
146 return (static_cast<Storage&&>(val)._t2);
147 } else if constexpr (I == 3) {
148 return (static_cast<Storage&&>(val)._t3);
149 } else {
150 return detail::variant_storage_get<I - 4>(static_cast<Storage&&>(val)._tail);
151 }
152 }
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ get_alternatives_index_v

template<typename T , typename Alternative , typename... Alternatives>
std::size_t sysio::vm::detail::get_alternatives_index_v
constexpr
Initial value:
=
std::is_same_v<T, Alternative> ? 0 : get_alternatives_index_v<T, Alternatives...> + 1
constexpr std::size_t get_alternatives_index_v
Definition variant.hpp:34

Definition at line 34 of file variant.hpp.

◆ get_alternatives_index_v< T, Alternative >

template<typename T , typename Alternative >
std::size_t sysio::vm::detail::get_alternatives_index_v< T, Alternative > = 0
constexpr

Definition at line 38 of file variant.hpp.

◆ is_tag_v

template<typename T >
bool sysio::vm::detail::is_tag_v = false
constexpr

Definition at line 140 of file host_function.hpp.

◆ is_tag_v< tag< T > >

template<typename T >
bool sysio::vm::detail::is_tag_v< tag< T > > = true
constexpr

Definition at line 142 of file host_function.hpp.

◆ is_valid_alternative_v

template<typename T , typename... Alternatives>
bool sysio::vm::detail::is_valid_alternative_v = (... + (std::is_same_v<T, Alternatives>?1:0)) != 0
constexpr

Definition at line 31 of file variant.hpp.

◆ max_alignof_v

template<typename... Ts>
std::size_t sysio::vm::detail::max_alignof_v = std::max({alignof(Ts)...})
constexpr

Definition at line 28 of file variant.hpp.

◆ max_layout_size_v

template<typename... Ts>
std::size_t sysio::vm::detail::max_layout_size_v = std::max({sizeof(Ts)...})
constexpr

Definition at line 25 of file variant.hpp.