Home
last modified time | relevance | path

Searched refs:Tag (Results 1 – 25 of 57) sorted by relevance

123

/wasmtime-44.0.1/crates/wasmtime/src/runtime/externals/
H A Dtag.rs16 pub struct Tag { struct
21 impl Tag { argument
22 pub(crate) fn from_raw(instance: StoreInstanceId, index: DefinedTagIndex) -> Tag { in from_raw() argument
23 Tag { instance, index } in from_raw()
27 pub fn new(mut store: impl AsContextMut, ty: &TagType) -> Result<Tag> { in new() argument
44 pub(crate) fn wasmtime_ty<'a>(&self, store: &'a StoreOpaque) -> &'a wasmtime_environ::Tag { in wasmtime_ty() argument
78 pub fn eq(a: &Tag, b: &Tag, store: impl AsContext) -> bool { in eq() argument
109 ) -> Tag { in from_raw_indices() argument
111 Tag { instance, index } in from_raw_indices()
/wasmtime-44.0.1/crates/c-api/src/
H A Dtag.rs5 use wasmtime::Tag;
12 ret: &mut MaybeUninit<Tag>, in wasmtime_tag_new() argument
15 handle_result(Tag::new(&mut store, &tag_type), |tag| { in wasmtime_tag_new()
24 tag: &Tag, in wasmtime_tag_type() argument
32 pub extern "C" fn wasmtime_tag_eq(store: WasmtimeStoreContext<'_>, a: &Tag, b: &Tag) -> bool { in wasmtime_tag_eq() argument
33 Tag::eq(a, b, store) in wasmtime_tag_eq()
H A Dextern.rs6 use wasmtime::{Extern, Func, Global, Memory, SharedMemory, Table, Tag};
26 Extern::Tag(_) => crate::types::WASMTIME_EXTERNTYPE_TAG, in wasm_extern_kind()
98 pub tag: Tag,
119 WASMTIME_EXTERN_TAG => Extern::Tag(self.of.tag), in to_extern()
150 Extern::Tag(tag) => wasmtime_extern_t { in from()
H A Dexn.rs5 use wasmtime::{AsContextMut, ExnRef, ExnRefPre, ExnType, RootScope, Tag};
17 tag: &Tag, in wasmtime_exn_new() argument
44 tag_ret: &mut Tag, in wasmtime_exn_tag() argument
/wasmtime-44.0.1/crates/wasmtime/src/runtime/
H A Dexternals.rs10 pub use tag::Tag;
37 Tag(Tag), enumerator
101 pub fn into_tag(self) -> Option<Tag> { in into_tag() argument
103 Extern::Tag(tag) => Some(tag), in into_tag()
124 Extern::Tag(tt) => ExternType::Tag(tt.ty(store)), in ty()
140 crate::runtime::vm::Export::Tag(t) => Extern::Tag(t), in from_wasmtime_export()
151 Extern::Tag(t) => t.comes_from_same_store(store), in comes_from_same_store()
186 impl From<Tag> for Extern {
187 fn from(t: Tag) -> Self { in from()
188 Extern::Tag(t) in from()
[all …]
/wasmtime-44.0.1/crates/fuzzing/tests/oom/
H A Dtag.rs3 use wasmtime::{Config, Engine, FuncType, Result, Store, Tag, TagType};
17 let _tag = Tag::new(&mut store, &tag_ty)?; in tag_new()
33 let tag = Tag::new(&mut store, &tag_ty)?; in tag_ty()
50 let tag1 = Tag::new(&mut store, &tag_ty)?; in tag_eq()
51 let tag2 = Tag::new(&mut store, &tag_ty)?; in tag_eq()
52 assert!(Tag::eq(&tag1, &tag1, &store)); in tag_eq()
53 assert!(!Tag::eq(&tag1, &tag2, &store)); in tag_eq()
/wasmtime-44.0.1/tests/all/
H A Dexnrefs.rs12 let tag = Tag::new(&mut store, &tag_ty).unwrap(); in tag_objects()
16 let tag2 = Tag::new(&mut store, &tag_ty).unwrap(); in tag_objects()
18 assert!(!Tag::eq(&tag, &tag2, &store)); in tag_objects()
31 let tag = Tag::new(&mut store, &tag_ty).unwrap(); in exn_types()
35 let tag2 = Tag::new(&mut store, &tag_ty).unwrap(); in exn_types()
37 assert!(!Tag::eq(&tag, &tag2, &store)); in exn_types()
54 let tag = Tag::new(&mut store, &exntype.tag_type()).unwrap(); in exn_objects()
81 assert!(Tag::eq(&obj.tag(&mut scope)?, &tag, &scope)); in exn_objects()
H A Dtags.rs31 assert!(Tag::eq(&t1, &t1, &store)); in wasm_export_tags()
32 assert!(!Tag::eq(&t1, &t2, &store)); in wasm_export_tags()
39 assert!(Tag::eq(&t3, &t3, &store)); in wasm_export_tags()
40 assert!(!Tag::eq(&t3, &t1, &store)); in wasm_export_tags()
41 assert!(!Tag::eq(&t3, &t2, &store)); in wasm_export_tags()
74 assert!(Tag::eq(&t1, &t1_2, &store)); in wasm_import_tags()
76 assert!(Tag::eq(&t1, &t1_22, &store)); in wasm_import_tags()
77 assert!(Tag::eq(&t1_2, &t1_22, &store)); in wasm_import_tags()
H A Dexceptions.rs73 let tag0 = Tag::new(&mut store, &tagty)?; in dynamic_tags()
74 let tag1 = Tag::new(&mut store, &tagty)?; in dynamic_tags()
78 let instance1 = Instance::new(&mut store, &module, &[Extern::Tag(tag0), Extern::Tag(tag1)])?; in dynamic_tags()
89 let instance2 = Instance::new(&mut store, &module, &[Extern::Tag(tag0), Extern::Tag(tag0)])?; in dynamic_tags()
119 let tag = Tag::new(&mut store, &tagty)?; in exception_escape_to_host()
128 assert!(Tag::eq(&exntag, &tag, &store)); in exception_escape_to_host()
159 let tag = Tag::new(&mut store, &tagty)?; in exception_from_host()
174 &[Extern::Tag(tag), Extern::Func(extfunc)], in exception_from_host()
193 let tag = Tag::new(&mut store, &tagty)?; in exception_across_no_wasm()
210 assert!(Tag::eq(&exntag, &tag, &store)); in exception_across_no_wasm()
[all …]
/wasmtime-44.0.1/crates/c-api/include/wasmtime/
H A Dtag.hh26 class Tag { class
32 Tag(wasmtime_tag_t tag) : tag(tag) {} in Tag() function in wasmtime::Tag
40 static Result<Tag> create(Store::Context cx, const TagType &ty) { in create()
46 return Tag(tag); in create()
55 bool eq(Store::Context cx, const Tag &other) const { in eq()
H A Dextern_declare.hh15 class Tag;
19 typedef std::variant<Func, Global, Memory, Table, Tag> Extern;
H A Dexn.hh57 static Result<Exn> create(Store::Context cx, const Tag &tag, in create()
71 Result<Tag> tag(Store::Context cx) const { in tag()
77 return Tag(tag); in tag()
H A Dextern.hh32 return Tag(e.of.tag); in cvt_extern()
50 } else if (const auto *tag = std::get_if<Tag>(&e)) { in cvt_extern()
H A Dstore.hh21 class Tag;
81 friend class Tag;
/wasmtime-44.0.1/cranelift/codegen/src/ir/
H A Dexception_table.rs86 Tag(ExceptionTag, BlockCall), enumerator
105 Tag(ExceptionTag, u32), enumerator
144 ExceptionTableItem::Tag(tag, target) => { in new()
145 items.push(InternalExceptionTableItem::Tag(tag, target_idx)); in new()
196 InternalExceptionTableItem::Tag(tag, target_idx) => { in items()
197 ExceptionTableItem::Tag(*tag, self.targets[usize::try_from(*target_idx).unwrap()]) in items()
274 ExceptionTableItem::Tag(tag, block_call) => { in fmt()
/wasmtime-44.0.1/crates/c-api/src/types/
H A Dtag.rs38 CExternType::Tag(_) => Some(unsafe { &*(e as *const _ as *const _) }), in try_from()
45 CExternType::Tag(t) => t, in cty()
59 ext: wasm_externtype_t::from_cextern_type(CExternType::Tag(CTagType::new(ty))), in from_tag_type()
70 ext: wasm_externtype_t::from_cextern_type(CExternType::Tag(CTagType::from_cfunc(cfunc))), in wasm_tagtype_new()
H A Dextern.rs19 Tag(CTagType), enumerator
29 ExternType::Tag(t) => CExternType::Tag(CTagType::new(t)), in new()
63 CExternType::Tag(_) => WASMTIME_EXTERNTYPE_TAG, in wasm_externtype_kind()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/trampoline/
H A Dtag.rs9 use wasmtime_environ::Tag;
26 let tag_id = module.tags.push(Tag { in create_tag()
32 module.exports.insert(name, EntityIndex::Tag(tag_id))?; in create_tag()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/types/
H A Dmatching.rs4 EntityType, Global, IndexType, Memory, Table, Tag, TypeTrace, VMSharedTypeIndex, WasmHeapType,
43 EntityType::Tag(expected) => match actual { in definition()
44 DefinitionType::Tag(actual) => tag_ty(expected, actual), in definition()
96 EntityType::Tag(expected) => match actual { in entity_ty()
97 EntityType::Tag(actual) => tag_ty(expected, actual), in entity_ty()
170 fn tag_ty(expected: &Tag, actual: &Tag) -> Result<()> { in tag_ty() argument
420 EntityType::Tag(_) => "tag", in entity_desc()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dexport.rs21 Tag(crate::Tag), enumerator
/wasmtime-44.0.1/crates/c-api/tests/
H A Dexception.cc22 auto tag = Tag::create(cx, tt).unwrap(); in TEST()
59 auto tag = std::get<Tag>(*ext); in TEST()
74 auto tag = Tag::create(cx, tt).unwrap(); in TEST()
141 auto tag = std::get<Tag>(*tag_ext); in TEST()
198 auto tag = std::get<Tag>(*tag_ext); in TEST()
/wasmtime-44.0.1/crates/debugger/src/host/
H A Dopaque.rs8 Module, OwnedRooted, Result, Table, Tag, TagType, Val, ValType,
45 async fn instance_get_tag(&mut self, instance: Instance, idx: u32) -> Result<Option<Tag>>; in instance_get_tag() argument
96 async fn tag_params(&mut self, tag: Tag) -> Result<Vec<wit::WasmType>>; in tag_params()
97 async fn tag_new(&mut self, engine: Engine, params: Vec<ValType>) -> Result<Tag>; in tag_new() argument
99 async fn exnref_get_tag(&mut self, exn: OwnedRooted<ExnRef>) -> Result<Tag>; in exnref_get_tag() argument
101 async fn exnref_new(&mut self, tag: Tag, fields: Vec<WasmValue>) in exnref_new() argument
432 async fn tag_params(&mut self, tag: Tag) -> Result<Vec<wit::WasmType>> { in tag_params()
443 async fn tag_new(&mut self, engine: Engine, params: Vec<ValType>) -> Result<Tag> { in tag_new() argument
447 Tag::new(&mut store, &tag_ty) in tag_new()
452 async fn exnref_get_tag(&mut self, exn: OwnedRooted<ExnRef>) -> Result<Tag> { in exnref_get_tag() argument
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/gc/disabled/
H A Dexnref.rs4 AsContext, AsContextMut, ExnType, GcRefImpl, HeapType, Result, Rooted, Tag, Val,
59 pub fn tag(&self, _store: impl AsContextMut) -> Result<Tag> { in tag() argument
/wasmtime-44.0.1/crates/wasmtime/src/runtime/gc/enabled/
H A Dexnref.rs13 use crate::{ExnType, FieldType, GcHeapOutOfMemory, StoreContextMut, Tag, prelude::*};
208 tag: &Tag, in new() argument
253 tag: &Tag, in new_async() argument
272 tag: &Tag, in _new_async() argument
289 tag: &Tag, in type_check_tag_and_fields() argument
326 tag: &Tag, in new_unchecked() argument
624 pub fn tag(&self, mut store: impl AsContextMut) -> Result<Tag> { in tag() argument
629 Ok(Tag::from_raw_indices(&*store, instance, index)) in tag()
/wasmtime-44.0.1/crates/environ/src/
H A Dmodule.rs371 pub tags: TryPrimaryMap<TagIndex, Tag>,
596 EntityIndex::Tag(i) => EntityType::Tag(self.tags[i]), in type_of()
609 .push(Tag { in push_tag()
672 EntityIndex::Tag(i) => self.tags.is_valid(i), in is_valid()

123