| /wasmtime-44.0.1/crates/wasmtime/src/runtime/ |
| H A D | values.rs | 574 impl From<Ref> for Val { 709 pub enum Ref { enum 778 impl From<Func> for Ref { implementation 788 Ref::Func(f) in from() 802 Ref::Extern(e) in from() 809 Ref::Any(Some(e)) in from() 816 Ref::Any(e) in from() 858 Ref::Exn(e) in from() 862 impl Ref { impl 879 Ref::Any(None) | Ref::Extern(None) | Ref::Func(None) | Ref::Exn(None) => true, in is_null() [all …]
|
| H A D | types.rs | 103 Ref(RefType), enumerator 128 ValType::Ref(r) in from() 218 matches!(self, ValType::Ref(_)) in is_ref() 226 ValType::Ref(RefType { in is_funcref() 238 ValType::Ref(RefType { in is_externref() 250 ValType::Ref(RefType { in is_anyref() 262 ValType::Ref(RefType { in is_contref() 302 (Self::Ref(a), Self::Ref(b)) => a.matches(b), in matches() 359 Self::Ref(r) => WasmValType::Ref(r.to_wasm_type()), in to_wasm_type() 371 WasmValType::Ref(r) => Self::Ref(RefType::from_wasm_type(engine, r)), in from_wasm_type() [all …]
|
| /wasmtime-44.0.1/crates/c-api/include/wasmtime/types/ |
| H A D | extern.hh | 34 typedef std::variant<FuncType::Ref, GlobalType::Ref, TableType::Ref, 35 MemoryType::Ref, TagType::Ref> 36 Ref; typedef in wasmtime::ExternType 39 static Ref from_import(ImportType::Ref ty) { in from_import() 46 static Ref from_export(ExportType::Ref ty) { in from_export() 53 static Ref ref_from_c(const wasm_externtype_t *ptr) { in ref_from_c()
|
| H A D | global.hh | 27 class Ref { class in wasmtime::GlobalType 33 Ref(const wasm_globaltype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::GlobalType::Ref 35 Ref(const GlobalType &ty) : Ref(ty.ptr.get()) {} in Ref() function in wasmtime::GlobalType::Ref 43 ValType::Ref content() const { return wasm_globaltype_content(ptr); } in content() 47 Ref ref; 57 GlobalType(Ref other) : GlobalType(wasm_globaltype_copy(other.ptr)) {} in GlobalType() 74 Ref *operator->() { return &ref; } in operator ->() 77 Ref *operator*() { return &ref; } in operator *()
|
| H A D | tag.hh | 33 class Ref { class in wasmtime::TagType 39 Ref(const wasm_tagtype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::TagType::Ref 41 Ref(const TagType &ty) : Ref(ty.ptr.get()) {} in Ref() function in wasmtime::TagType::Ref 52 Ref ref; 62 TagType(Ref other) : TagType(wasm_tagtype_copy(other.ptr)) {} in TagType() 79 Ref *operator->() { return &ref; } in operator ->() 82 Ref *operator*() { return &ref; } in operator *()
|
| H A D | val.hh | 95 class Ref { class in wasmtime::ValType 102 Ref(const wasm_valtype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::ValType::Ref 104 Ref(const ValType &ty) : Ref(ty.ptr.get()) {} in Ref() function in wasmtime::ValType::Ref 129 typedef const Ref *iterator; 133 return reinterpret_cast<Ref *>(&list->data[0]); // NOLINT in begin() 138 return reinterpret_cast<Ref *>(&list->data[list->size]); // NOLINT in end() 146 Ref ref; 153 ValType(Ref other) : ValType(wasm_valtype_copy(other.ptr)) {} in ValType() 170 Ref *operator->() { return &ref; } in operator ->() 173 Ref *operator*() { return &ref; } in operator *()
|
| H A D | table.hh | 28 class Ref { class in wasmtime::TableType 35 Ref(const wasm_tabletype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::TableType::Ref 37 Ref(const TableType &ty) : Ref(ty.ptr.get()) {} in Ref() function in wasmtime::TableType::Ref 52 ValType::Ref element() const { return wasm_tabletype_element(ptr); } in element() 56 Ref ref; 80 TableType(Ref other) : TableType(wasm_tabletype_copy(other.ptr)) {} in TableType() 97 Ref *operator->() { return &ref; } in operator ->() 100 Ref *operator*() { return &ref; } in operator *()
|
| H A D | func.hh | 29 class Ref { class in wasmtime::FuncType 35 Ref(const wasm_functype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::FuncType::Ref 37 Ref(const FuncType &ty) : Ref(ty.ptr.get()) {} in Ref() function in wasmtime::FuncType::Ref 47 Ref ref; 59 FuncType(Ref other) : FuncType(wasm_functype_copy(other.ptr)) {} in FuncType() 96 Ref *operator->() { return &ref; } in operator ->() 99 Ref *operator*() { return &ref; } in operator *()
|
| H A D | memory.hh | 34 class Ref { class in wasmtime::MemoryType 40 Ref() : ptr(nullptr) {} in Ref() function in wasmtime::MemoryType::Ref 44 Ref(const wasm_memorytype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::MemoryType::Ref 46 Ref(const MemoryType &ty) : Ref(ty.ptr.get()) {} in Ref() function in wasmtime::MemoryType::Ref 78 Ref ref; 125 MemoryType(Ref other) : MemoryType(wasm_memorytype_copy(other.ptr)) {} in MemoryType() 142 Ref *operator->() { return &ref; } in operator ->() 145 Ref *operator*() { return &ref; } in operator *()
|
| H A D | export.hh | 26 class Ref { class in wasmtime::ExportType 35 Ref(const wasm_exporttype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::ExportType::Ref 45 Ref ref() const { return Ref(ptr.get()); } in ref() 76 typedef const Ref *iterator;
|
| H A D | import.hh | 25 class Ref { class in wasmtime::ImportType 35 Ref(const wasm_importtype_t *ptr) : ptr(ptr) {} in Ref() function in wasmtime::ImportType::Ref 51 Ref ref() const { return Ref(ptr.get()); } in ref() 82 typedef const Ref *iterator;
|
| /wasmtime-44.0.1/tests/all/ |
| H A D | gc.rs | 864 Ref::Extern(None), in table_copy_doesnt_leak() 891 Ref::Extern(None), in table_set_doesnt_leak() 918 Ref::Extern(None), in table_grow_doesnt_leak() 1012 (Ref::Any(None), RefType::NULLREF, true), in ref_matches() 1020 (Ref::Any(None), RefType::ARRAYREF, true), in ref_matches() 1024 (Ref::Any(None), RefType::I31REF, true), in ref_matches() 1025 (Ref::Func(None), RefType::I31REF, false), in ref_matches() 1028 (Ref::Any(None), RefType::EQREF, true), in ref_matches() 1029 (Ref::Func(None), RefType::EQREF, false), in ref_matches() 1032 (Ref::Any(None), RefType::ANYREF, true), in ref_matches() [all …]
|
| H A D | table.rs | 7 let table = Table::new(&mut store, ty, Ref::Func(None)).unwrap(); in get_none() 9 Some(Ref::Func(None)) => {} in get_none() 22 .fill(&mut store, 0, Ref::Extern(None), 1) in fill_wrong() 32 .fill(&mut store, 0, Ref::Func(None), 1) in fill_wrong() 59 let table = Table::new(&mut store, ty, Ref::Func(None))?; in null_elem_segment_works_with_imported_table() 92 Ref::Any(None), in i31ref_table_new() 123 Ref::Any(None), in i31ref_table_get() 166 Ref::Any(None), in i31ref_table_set() 170 Ref::Any(None), in i31ref_table_set() 216 (RefType::I31REF, Ref::Any(None)), in i31ref_table_grow() [all …]
|
| H A D | limits.rs | 54 Ref::Func(None), in test_limits() 57 table.grow(&mut store, 2, Ref::Func(None))?; in test_limits() 58 table.grow(&mut store, 1, Ref::Func(None))?; in test_limits() 59 table.grow(&mut store, 2, Ref::Func(None))?; in test_limits() 163 Ref::Func(None), in test_limits_async() 226 Ref::Func(None), in test_limits_memory_only() 300 Ref::Func(None), in test_limits_table_only() 338 Ref::Func(None), in test_initial_table_limits_exceeded() 677 table.grow(&mut store, 3, Ref::Func(None))?; in test_custom_table_limiter() 678 table.grow(&mut store, 5, Ref::Func(None))?; in test_custom_table_limiter() [all …]
|
| H A D | externals.rs | 39 assert!(t.set(&mut store, 0, Ref::Func(None)).is_ok()); in bad_tables() 40 assert!(t.set(&mut store, 1, Ref::Func(None)).is_err()); in bad_tables() 256 table.set(&mut store, 5, Ref::Func(None))?; in create_get_set_funcref_tables_via_api() 300 table.grow(&mut store, 3, Ref::Func(None))?; in grow_funcref_tables_via_api() 329 table.set(&mut store, 5, Ref::Extern(None))?; in create_get_set_externref_tables_via_api() 384 table.grow(&mut store, 3, Ref::Extern(None))?; in grow_externref_tables_via_api() 469 [ValType::Ref(RefType::new( in dummy_funcs_and_subtypes() 641 Ref::Func(None), in table_set_func_subtyping() 684 Ref::Func(None), in table_grow_func_subtyping() 729 Ref::Func(None), in table_fill_func_subtyping() [all …]
|
| /wasmtime-44.0.1/crates/fuzzing/tests/oom/ |
| H A D | table.rs | 3 use wasmtime::{Config, Engine, Ref, RefType, Result, Store, Table, TableType}; 35 let table = Table::new(&mut store, ty, Ref::Func(None))?; in table_grow() 36 let _old_size = table.grow(&mut store, 4, Ref::Func(None))?; in table_grow() 51 let table = Table::new(&mut store, ty, Ref::Func(None))?; in table_set() 52 table.set(&mut store, 0, Ref::Func(None))?; in table_set() 67 let table = Table::new(&mut store, ty, Ref::Func(None))?; in table_copy() 83 let table = Table::new(&mut store, ty, Ref::Func(None))?; in table_fill() 84 table.fill(&mut store, 0, Ref::Func(None), 4)?; in table_fill() 99 let table = Table::new(&mut store, ty, Ref::Func(None))?; in table_get() 116 let table = Table::new(&mut store, ty, Ref::Func(None))?; in table_ty() [all …]
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/externals/ |
| H A D | table.rs | 110 init: Ref, in new_async() argument 120 init: Ref, in _new() argument 355 init: Ref, in grow_async() argument 503 val: Ref, in _fill() argument 606 impl Ref { implementation 616 (Ref::Func(None), HeapType::Func) => { in into_table_func() 620 (Ref::Func(Some(f)), HeapType::Func) => { in into_table_func() 641 (Ref::Extern(e), HeapType::Extern) => match e { in into_table_gc_ref() 649 (Ref::Any(a), HeapType::Any) => match a { in into_table_gc_ref() 657 (Ref::Exn(e), HeapType::Exn) => match e { in into_table_gc_ref() [all …]
|
| H A D | global.rs | 5 Ref, RootedGcRefImpl, Val, ValType, 155 ValType::Ref(ref_ty) => { in _get() 156 let reference: Ref = match ref_ty.heap_type() { in _get() 161 HeapType::NoFunc => Ref::Func(None), in _get() 163 HeapType::Extern => Ref::Extern(definition.as_gc_ref().map(|r| { in _get() 173 HeapType::NoExtern => Ref::Extern(None), in _get() 197 HeapType::NoExn => Ref::Exn(None), in _get() 199 HeapType::None => Ref::Any(None), in _get()
|
| /wasmtime-44.0.1/crates/c-api/include/ |
| H A D | wasm.hh | 483 class WASM_API_EXTERN Ref { class 488 Ref() = default; 489 ~Ref() = default; 492 auto copy() const -> own<Ref>; 493 auto same(const Ref*) const -> bool; 509 Ref* ref; 568 auto release_ref() -> own<Ref> { in release_ref() 572 return own<Ref>(ref); in release_ref() 593 template<> inline auto Val::make<Ref>(own<Ref>&& x) -> Val { in make() 608 template<> inline auto Val::get<Ref*>() const -> Ref* { return ref(); } in get() [all …]
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/gc/ |
| H A D | none_ref.rs | 2 HeapType, Ref, RefType, Result, Val, ValRaw, ValType, WasmTy, 81 pub fn null_ref() -> Ref { in null_ref() 82 Ref::Extern(None) in null_ref() 96 ValType::Ref(RefType::new(false, HeapType::None)) in valtype() 126 ValType::Ref(RefType::new(true, HeapType::None)) in valtype()
|
| H A D | noextern.rs | 2 HeapType, Ref, RefType, Result, Val, ValRaw, ValType, WasmTy, 81 pub fn null_ref() -> Ref { in null_ref() 82 Ref::Extern(None) in null_ref() 96 ValType::Ref(RefType::new(false, HeapType::NoExtern)) in valtype() 126 ValType::Ref(RefType::new(true, HeapType::NoExtern)) in valtype()
|
| /wasmtime-44.0.1/crates/debugger/src/host/ |
| H A D | bindings.rs | 49 ValType::Ref(rt) if rt.heap_type().is_exn() => Ok(wit::WasmType::WasmExnref), in val_type_to_wasm_type() 50 ValType::Ref(rt) if rt.heap_type().is_func() => Ok(wit::WasmType::WasmFuncref), in val_type_to_wasm_type() 51 ValType::Ref(_) => Err(wit::Error::UnsupportedType.into()), in val_type_to_wasm_type()
|
| /wasmtime-44.0.1/crates/c-api/tests/ |
| H A D | extern_type.cc | 21 auto import_ty = std::get<FuncType::Ref>(ExternType::from_import(i)); in TEST() 28 auto export_ty = std::get<GlobalType::Ref>(ExternType::from_export(e)); in TEST()
|
| H A D | types.cc | 30 ValType::Ref r(t4); in TEST() 80 auto import_ty = std::get<FuncType::Ref>(ExternType::from_import(i)); in TEST() 91 auto export_ty = std::get<GlobalType::Ref>(ExternType::from_export(e)); in TEST()
|
| /wasmtime-44.0.1/crates/c-api/src/ |
| H A D | val.rs | 8 use wasmtime::{AsContextMut, Func, HeapType, Ref, RootScope, Val, ValType}; 31 ValType::Ref(_) => unsafe { in drop() 49 ValType::Ref(_) if !self.of.ref_.is_null() => { in clone() 92 r: Ref::Func(Some(f)), in from_val() 111 ValType::Ref(r) => match r.heap_type() { in val()
|