Home
last modified time | relevance | path

Searched refs:AnyRef (Results 1 – 25 of 48) sorted by relevance

12

/wasmtime-44.0.1/crates/wast/src/
H A Dcore.rs31 AnyRef { in val()
33 } => Val::AnyRef(None), in val()
34 AnyRef { in val()
43 Val::AnyRef(Some(x)) in val()
45 NullRef => Val::AnyRef(None), in val()
92 | (Val::AnyRef(_), CoreConst::AnyRef { value: None }) in match_val()
94 | (Val::AnyRef(None), CoreConst::NullRef) in match_val()
105 Val::AnyRef(None), in match_val()
106 CoreConst::AnyRef { in match_val()
181 Val::AnyRef(Some(x)), in match_val()
[all …]
/wasmtime-44.0.1/crates/c-api/include/wasmtime/
H A Dval.hh112 class AnyRef { class
122 AnyRef(const AnyRef &other) { wasmtime_anyref_clone(&other.val, &val); } in AnyRef() function in wasmtime::AnyRef
125 AnyRef &operator=(const AnyRef &other) { in operator =()
132 AnyRef(AnyRef &&other) { in AnyRef() function in wasmtime::AnyRef
138 AnyRef &operator=(AnyRef &&other) { in operator =()
152 return AnyRef(other); in i31()
291 Val(std::optional<AnyRef> ptr) : val{} { in Val()
305 Val(AnyRef ptr);
352 return ValKind::AnyRef; in kind()
428 std::optional<AnyRef> anyref() const { in anyref()
[all …]
H A Dgc.hh30 friend class AnyRef;
105 AnyRef to_anyref() const { in to_anyref()
108 return AnyRef(out); in to_anyref()
202 friend class AnyRef;
276 AnyRef to_anyref() const { in to_anyref()
279 return AnyRef(out); in to_anyref()
354 friend class AnyRef;
428 AnyRef to_anyref() const { in to_anyref()
431 return AnyRef(out); in to_anyref()
449 inline bool AnyRef::is_eqref(Store::Context cx) const { in is_eqref()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/gc/disabled/
H A Danyref.rs10 pub enum AnyRef {} enum
12 impl From<Rooted<EqRef>> for Rooted<AnyRef> {
19 impl From<OwnedRooted<EqRef>> for OwnedRooted<AnyRef> {
26 impl From<Rooted<StructRef>> for Rooted<AnyRef> {
33 impl From<OwnedRooted<StructRef>> for OwnedRooted<AnyRef> {
40 impl From<Rooted<ArrayRef>> for Rooted<AnyRef> {
47 impl From<OwnedRooted<ArrayRef>> for OwnedRooted<AnyRef> {
54 impl GcRefImpl for AnyRef {} implementation
56 impl AnyRef { impl
/wasmtime-44.0.1/crates/wasmtime/src/runtime/gc/enabled/
H A Danyref.rs95 pub struct AnyRef { struct
99 impl From<Rooted<EqRef>> for Rooted<AnyRef> { argument
113 impl From<Rooted<StructRef>> for Rooted<AnyRef> {
127 impl From<Rooted<ArrayRef>> for Rooted<AnyRef> {
141 unsafe impl GcRefImpl for AnyRef { implementation
158 impl AnyRef { implementation
302 .matches(VMGcKind::AnyRef) in from_cloned_gc_ref()
686 unsafe impl WasmTy for Rooted<AnyRef> {
756 <Rooted<AnyRef>>::wasm_ty_option_load(store, ptr.get_anyref(), AnyRef::from_cloned_gc_ref) in load()
760 unsafe impl WasmTy for OwnedRooted<AnyRef> {
[all …]
H A Dexternref.rs3 use super::{AnyRef, RootedGcRefImpl};
394 anyref: Rooted<AnyRef>, in convert_any() argument
402 anyref: Rooted<AnyRef>, in _convert_any() argument
/wasmtime-44.0.1/crates/wasmtime/src/runtime/
H A Dvalues.rs56 AnyRef(Option<Rooted<AnyRef>>), enumerator
125 Val::AnyRef(None) in null_any_ref()
237 | (Val::AnyRef(_), _) in _matches_ty()
379 (AnyRef(Option<&Rooted<AnyRef>>) any_ref unwrap_any_ref e.as_ref())
600 impl From<Rooted<AnyRef>> for Val {
603 Val::AnyRef(Some(val)) in from()
610 Val::AnyRef(val) in from()
617 Val::AnyRef(Some(val.into())) in from()
631 Val::AnyRef(Some(val.into())) in from()
767 Any(Option<Rooted<AnyRef>>),
[all …]
/wasmtime-44.0.1/tests/all/
H A Di31ref.rs14 AnyRef::from_i31(&mut scope, I31::wrapping_u32(42)) in always_pop_i31ref_lifo_roots()
35 let anyref = AnyRef::from_i31(&mut store, I31::wrapping_u32(42)); in i31ref_to_raw_round_trip()
37 let anyref = AnyRef::from_raw(&mut store, raw).expect("should be non-null"); in i31ref_to_raw_round_trip()
62 let f = instance.get_typed_func::<Option<OwnedRooted<AnyRef>>, Option<OwnedRooted<AnyRef>>>( in owned_rooted_i31ref_through_typed_wasm_func()
67 let anyref = AnyRef::from_i31(&mut store, I31::wrapping_u32(42)); in owned_rooted_i31ref_through_typed_wasm_func()
H A Dtable.rs93 AnyRef::from_i31(&mut store, I31::default()).into(), in i31ref_table_new()
98 vec![AnyRef::from_i31(&mut store, I31::default()).into()], in i31ref_table_new()
124 AnyRef::from_i31(&mut store, I31::default()).into(), in i31ref_table_get()
129 vec![AnyRef::from_i31(&mut store, I31::default()).into()], in i31ref_table_get()
167 AnyRef::from_i31(&mut store, I31::default()).into(), in i31ref_table_set()
171 AnyRef::from_i31(&mut store, I31::wrapping_u32(42)).into(), in i31ref_table_set()
176 vec![AnyRef::from_i31(&mut store, I31::default()).into()], in i31ref_table_set()
219 AnyRef::from_i31(&mut store, I31::default()).into(), in i31ref_table_grow()
229 let grow_val = AnyRef::from_i31(&mut store, expected); in i31ref_table_grow()
263 let fill_val = AnyRef::from_i31(&mut store, expected); in i31ref_table_fill()
[all …]
H A Dglobals.rs117 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_global_new()
141 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_global_get()
176 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_global_set()
180 Some(AnyRef::from_i31(&mut store, I31::new_u32(36).unwrap())), in i31ref_global_set()
217 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_global_ty()
241 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_as_anyref_global_new()
265 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_as_anyref_global_get()
300 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_as_anyref_global_set()
304 Some(AnyRef::from_i31(&mut store, I31::new_u32(36).unwrap())), in i31ref_as_anyref_global_set()
341 Some(AnyRef::from_i31(&mut store, I31::new_u32(42).unwrap())), in i31ref_as_anyref_global_ty()
H A Dfunc.rs408 Func::wrap(&mut store, || -> Rooted<AnyRef> { in func_constructors()
412 Func::wrap(&mut store, || -> OwnedRooted<AnyRef> { in func_constructors()
464 Func::wrap(&mut store, || -> Result<Rooted<AnyRef>> { in func_constructors()
604 _: Option<Rooted<AnyRef>>, in signatures_match()
605 _: Option<OwnedRooted<AnyRef>>, in signatures_match()
702 i: Option<Rooted<AnyRef>>, in import_works()
703 j: Option<OwnedRooted<AnyRef>>, in import_works()
833 let f = Func::wrap(&mut store, || -> Rooted<AnyRef> { in get_from_wrapper()
836 assert!(f.typed::<(), Rooted<AnyRef>>(&store).is_ok()); in get_from_wrapper()
888 let f = Func::wrap(&mut store, |_: Rooted<AnyRef>| {}); in get_from_wrapper()
[all …]
H A Darrays.rs45 AnyRef::from_i31(&mut scope, I31::new_i32(1234).unwrap()) in array_new_unrooted_initial_elem()
66 let anyref = AnyRef::from_i31(&mut store2, I31::new_i32(1234).unwrap()); in array_new_cross_store_initial_elem()
130 AnyRef::from_i31(&mut scope, I31::new_i32(1234).unwrap()) in array_new_fixed_unrooted_initial_elem()
151 let anyref = AnyRef::from_i31(&mut store2, I31::new_i32(1234).unwrap()); in array_new_fixed_cross_store_initial_elem()
181 let anyref: Rooted<AnyRef> = a0.into(); in anyref_as_array()
186 let anyref = AnyRef::from_i31(&mut store, I31::new_i32(42).unwrap()); in anyref_as_array()
377 let array = ArrayRef::new_fixed(&mut store, &pre, &[Val::AnyRef(None)])?; in array_set_given_unrooted()
381 AnyRef::from_i31(&mut scope, I31::new_i32(1234).unwrap()) in array_set_given_unrooted()
400 let array = ArrayRef::new_fixed(&mut store1, &pre, &[Val::AnyRef(None)]).unwrap(); in array_set_cross_store_value()
402 let anyref = AnyRef::from_i31(&mut store2, I31::new_i32(1234).unwrap()); in array_set_cross_store_value()
[all …]
H A Deqref.rs15 let any_ref = AnyRef::from_i31(&mut store, i31); in eqref_from_i31()
H A Dstructs.rs47 AnyRef::from_i31(&mut scope, I31::new_i32(1234).unwrap()) in struct_new_unrooted_field()
69 let anyref = AnyRef::from_i31(&mut other_store, I31::new_i32(1234).unwrap()); in struct_new_cross_store_field()
101 let anyref: Rooted<AnyRef> = s0.into(); in anyref_as_struct()
107 let anyref: Rooted<AnyRef> = AnyRef::from_i31(&mut store, I31::new_i32(42).unwrap()); in anyref_as_struct()
235 AnyRef::from_i31(&mut scope, I31::wrapping_i32(42)) in struct_set_field_with_unrooted()
681 let g = Global::new(&mut store, global_ty.clone(), Val::AnyRef(None))?; in instantiate_with_struct_global()
/wasmtime-44.0.1/crates/fuzzing/src/generators/
H A Dvalue.rs19 AnyRef { null: bool }, enumerator
34 DiffValue::AnyRef { .. } => DiffValueType::AnyRef, in ty()
192 AnyRef => DiffValue::AnyRef { null: true }, in arbitrary_of_type()
240 DiffValue::AnyRef { null } => null.hash(state), in hash()
278 (Self::AnyRef { null: a }, Self::AnyRef { null: b }) => a == b, in eq()
297 AnyRef, enumerator
315 (true, HeapType::Any) => Ok(Self::AnyRef), in try_from()
316 (true, HeapType::I31) => Ok(Self::AnyRef), in try_from()
317 (true, HeapType::None) => Ok(Self::AnyRef), in try_from()
/wasmtime-44.0.1/crates/c-api/tests/
H A Dval.cc49 val = std::optional<AnyRef>(std::nullopt); in TEST()
50 EXPECT_EQ(val.kind(), ValKind::AnyRef); in TEST()
53 val = std::optional<AnyRef>(AnyRef::i31(store, 5)); in TEST()
54 EXPECT_EQ(val.kind(), ValKind::AnyRef); in TEST()
58 val = AnyRef::i31(store, -5); in TEST()
59 EXPECT_EQ(val.kind(), ValKind::AnyRef); in TEST()
H A Dgc.cc33 AnyRef upcast = eq.to_anyref(); in TEST()
72 AnyRef any = eq.to_anyref(); in TEST()
160 AnyRef any = s.to_anyref(); in TEST()
232 AnyRef any = arr.to_anyref(); in TEST()
236 TEST(AnyRef, DowncastI31) { in TEST() argument
243 AnyRef any = AnyRef::i31(cx, 42); in TEST()
259 TEST(AnyRef, DowncastStruct) { in TEST() argument
272 AnyRef any = s.to_anyref(); in TEST()
287 TEST(AnyRef, DowncastArray) { in TEST() argument
300 AnyRef any = arr.to_anyref(); in TEST()
/wasmtime-44.0.1/examples/
H A Danyref.rs24 let anyref = AnyRef::from_i31(&mut store, i31); in main()
46 let func = instance.get_typed_func::<Option<Rooted<AnyRef>>, ()>(&mut store, "take_anyref")?; in main()
51 instance.get_typed_func::<(), Option<Rooted<AnyRef>>>(&mut store, "return_anyref")?; in main()
H A Danyref.cc48 AnyRef i31 = AnyRef::i31(cx, 1234); in main()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dconst_expr.rs8 AnyRef, ArrayRef, ArrayRefPre, ArrayType, ExternRef, I31, StructRef, StructRefPre, StructType,
84 Ok(Val::AnyRef(Some(struct_ref.into()))) in struct_new()
243 let r = AnyRef::_from_i31(&mut AutoAssertNoGc::new(store), i31); in eval_loop()
244 self.stack.push(Val::AnyRef(Some(r))); in eval_loop()
353 self.stack.push(Val::AnyRef(Some(array.into()))); in eval_loop()
378 self.stack.push(Val::AnyRef(Some(array.into()))); in eval_loop()
415 self.stack.push(Val::AnyRef(Some(array.into()))); in eval_loop()
432 Some(externref) => Some(AnyRef::_convert_extern(&mut store, *externref)?), in eval_loop()
/wasmtime-44.0.1/crates/environ/src/
H A Dgc.rs471 AnyRef = 0b100000 << 26, enumerator
535 _ if x == Self::AnyRef.as_u32() => Some(Self::AnyRef), in try_from_u32()
552 let all = [ExternRef, AnyRef, EqRef, ArrayRef, StructRef, ExnRef]; in kind_matches()
556 (AnyRef, vec![EqRef, ArrayRef, StructRef]), in kind_matches()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/gc/enabled/
H A Darrayref.rs3 AnyRef, ExnRef, ExternRef, Func, HeapType, RootedGcRefImpl, StorageType, Val, ValType,
165 Val::AnyRef(AnyRef::_from_raw(store, raw)) in read_elem()
243 Val::AnyRef(a) => { in write_elem()
360 Val::AnyRef(x) => { in initialize_elem()
H A Dstructref.rs3 AnyRef, ExnRef, ExternRef, Func, HeapType, RootedGcRefImpl, StorageType, Val, ValType,
203 Val::AnyRef(a) => { in write_field()
310 Val::AnyRef(AnyRef::_from_raw(store, raw)) in read_field_impl()
366 Val::AnyRef(x) => { in initialize_field_impl()
/wasmtime-44.0.1/crates/fuzzing/src/oracles/
H A Ddiff_wasmtime.rs223 DiffValue::AnyRef { null } => { in from()
225 Val::AnyRef(None) in from()
249 Val::AnyRef(r) => DiffValue::AnyRef { null: r.is_none() }, in from()
/wasmtime-44.0.1/crates/c-api/include/wasmtime/types/
H A Dval.hh32 AnyRef, enumerator
46 X(AnyRef, "anyref", WASMTIME_ANYREF) \

12