5#ifndef WASMTIME_TYPES_EXNREF_HH
6#define WASMTIME_TYPES_EXNREF_HH
8#include <initializer_list>
13#include <wasmtime/types/_val_class.hh>
24#define wasmtime_exn_type_clone wasmtime_exn_type_copy
25 WASMTIME_CLONE_WRAPPER(ExnType, wasmtime_exn_type)
26#undef wasmtime_exn_type_clone
31 const std::initializer_list<ValType> ¶ms) {
32 std::vector<const wasm_valtype_t *> tmp;
33 for (
const auto ¶m : params)
34 tmp.push_back(param.capi());
37 params_vec.
size = tmp.size();
Global compilation state in Wasmtime.
Definition: engine.hh:22
Errors coming from Wasmtime.
Definition: error.hh:26
Owned handle to a WebAssembly exception type definition.
Definition: types/exnref.hh:22
TagType tag_type() const
Returns the tag type associated with this exception type.
Definition: types/exnref.hh:46
static Result< ExnType > create(const Engine &engine, const std::initializer_list< ValType > ¶ms)
Creates a new exception type with the given parameter types.
Definition: types/exnref.hh:30
Fallible result type used for Wasmtime.
Definition: error.hh:70
Definition: types/tag.hh:32
Type information for a WebAssembly exception tag.
Definition: types/tag.hh:20
An opaque object representing the type of a tag.
An object representing the type of a value.
A list of wasm_valtype_t values.
Definition: wasm.h:183
wasm_valtype_t ** data
Pointer to the base of this vector.
Definition: wasm.h:183
size_t size
Length of this vector.
Definition: wasm.h:183
WASM_API_EXTERN wasmtime_error_t * wasmtime_exn_type_new(const wasm_engine_t *engine, const wasm_valtype_vec_t *params, wasmtime_exn_type_t **out)
Creates a new exception type with the given parameter types.
struct wasmtime_exn_type wasmtime_exn_type_t
A type of a WebAssembly exception.
Definition: types/exnref.h:16
WASM_API_EXTERN wasm_tagtype_t * wasmtime_exn_type_tag_type(const wasmtime_exn_type_t *ty)
Returns tag type associated with this exception type.
void wasm_tagtype_delete(wasm_tagtype_t *)
Deletes a type.