Home
last modified time | relevance | path

Searched refs:rep (Results 1 – 25 of 59) sorted by relevance

123

/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/component/
H A Dhandle_table.rs229 let rep = resource.rep(&idx)?; in resource_lend() localVariable
264 rep: resource.rep(&idx)?, in remove_resource()
493 Slot::ErrorContext { rep } => Ok(*rep), in error_context_rep()
503 Slot::ErrorContext { rep } => *rep, in error_context_drop()
525 Slot::HostTask { rep } => Ok((*rep, true)), in subtask_rep()
533 Slot::GuestTask { rep } => (*rep, false), in subtask_remove()
534 Slot::HostTask { rep } => (*rep, true), in subtask_remove()
549 Slot::WaitableSet { rep, .. } => Ok(*rep), in waitable_set_rep()
557 Slot::WaitableSet { rep } => *rep, in waitable_set_remove()
592 Slot::GuestThread { rep } => Ok(*rep), in guest_thread_rep()
[all …]
H A Dresources.rs94 rep: u32,
107 pub(super) fn rep(&self, access_ty: &TypedResourceIndex) -> Result<u32> { in rep() method
109 (Self::Host(rep), TypedResourceIndex::Host(_)) => Ok(*rep), in rep()
114 (Self::Component { rep, ty }, TypedResourceIndex::Component { ty: expected, .. }) => { in rep()
116 Ok(*rep) in rep()
227 RemovedResource::Own { rep } => Ok(Some(rep)), in resource_drop()
259 RemovedResource::Own { rep } => Ok(rep), in resource_lift_own()
274 let (rep, is_own) = self.table_for_index(&index).resource_lend(index)?; in resource_lift_borrow()
279 Ok(rep) in resource_lift_borrow()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/
H A Dtable.rs13 rep: u32, field
29 self.rep.hash(state) in hash()
35 self.rep == other.rep in eq()
43 self.rep.partial_cmp(&other.rep) in partial_cmp()
49 self.rep.cmp(&other.rep) in cmp()
54 pub fn new(rep: u32) -> Self { in new()
56 rep, in new()
64 Self::new(self.rep) in clone()
71 pub fn rep(&self) -> u32 { in rep() method
72 self.rep in rep()
[all …]
H A Dfutures_and_streams.rs1429 let rep = concurrent_state.get_mut(state)?.read_handle.rep(); in lower_future_to_index() localVariable
1806 let rep = concurrent_state.get_mut(state)?.read_handle.rep(); in lower_stream_to_index() localVariable
1959 rep: u32, field
1964 Self { rep } in new()
1996 rep: u32, in lower_error_context_to_index()
3194 rep: u32, in copy()
3523 rep, in guest_write()
3749 rep, in guest_read()
4053 let (rep, state) = in guest_cancel_write()
4094 let (rep, state) = in guest_cancel_read()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/resources/
H A Dhost.rs17 rep: u32, field
141 pub fn new_own(rep: u32, ty: D) -> Self { in new_own()
144 rep, in new_own()
153 rep, in new_borrow()
159 pub fn rep(&self) -> u32 { in rep() function
160 self.rep in rep()
195 self.rep in lower_to_index()
251 let (state, rep, ty) = match ty { in lift_from_index()
280 rep, in lift_from_index()
288 rep, in try_into_resource_any()
[all …]
H A Dany.rs106 let rep = tables.host_resource_lift_own(idx)?; in try_into_host_resource() localVariable
107 Ok(HostResource::new_own(rep, ty)) in try_into_host_resource()
117 let rep = tables.host_resource_lift_borrow(idx)?; in try_into_host_resource() localVariable
120 Ok(HostResource::new_borrow(rep, ty)) in try_into_host_resource()
172 let (rep, slot) = match (pair, self.owned) { in resource_drop_impl()
198 let mut args = [ValRaw::u32(rep)]; in resource_drop_impl()
232 let rep = cx.host_resource_lift_own(self.idx)?; in lower_to_index() localVariable
233 cx.guest_resource_lower_own(t, rep) in lower_to_index()
239 let rep = cx.host_resource_lift_borrow(self.idx)?; in lower_to_index() localVariable
240 cx.guest_resource_lower_borrow(t, rep) in lower_to_index()
[all …]
H A Dhost_tables.rs143 rep: u32, in host_resource_lower_own()
147 let idx = self.tables.resource_lower_own(TypedResource::Host(rep))?; in host_resource_lower_own()
152 pub fn host_resource_lower_borrow(&mut self, rep: u32) -> Result<HostResourceIndex> { in host_resource_lower_borrow()
155 .resource_lower_borrow(TypedResource::Host(rep))?; in host_resource_lower_borrow()
250 Some(rep) => Ok(Some((rep, slot.unwrap()))), in host_resource_drop()
261 rep: u32, in guest_resource_lower_own()
265 .resource_lower_own(TypedResource::Component { ty, rep }) in guest_resource_lower_own()
279 rep: u32, in guest_resource_lower_borrow()
283 .resource_lower_borrow(TypedResource::Component { ty, rep }) in guest_resource_lower_borrow()
H A Dhost_dynamic.rs87 pub fn new_own(rep: u32, ty: u32) -> ResourceDynamic { in new_own()
88 ResourceDynamic(HostResource::new_own(rep, ty)) in new_own()
98 pub fn new_borrow(rep: u32, ty: u32) -> ResourceDynamic { in new_borrow()
99 ResourceDynamic(HostResource::new_borrow(rep, ty)) in new_borrow()
108 pub fn rep(&self) -> u32 { in rep() method
109 self.0.rep() in rep()
H A Dhost_static.rs162 pub fn new_own(rep: u32) -> Resource<T> { in new_own()
163 Resource(HostResource::new_own(rep, ())) in new_own()
173 pub fn new_borrow(rep: u32) -> Resource<T> { in new_borrow()
174 Resource(HostResource::new_borrow(rep, ())) in new_borrow()
179 pub fn rep(&self) -> u32 { in rep() function
180 self.0.rep() in rep()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/
H A Dresource_table.rs271 let parent = parent.rep(); in push_child()
287 self.occupied_mut(parent.rep())?.add_child(child.rep()); in add_child()
300 self.occupied_mut(parent.rep())?.remove_child(child.rep()); in remove_child()
309 self.get_(key.rep())? in get()
325 self.get_any_mut(key.rep())? in get_mut()
448 assert_eq!(x.rep(), 0); in test_free_list()
451 assert_eq!(y.rep(), 1); in test_free_list()
456 assert_eq!(x.rep(), 0); in test_free_list()
463 assert_eq!(y.rep(), 1); in test_free_list()
466 assert_eq!(x.rep(), 0); in test_free_list()
[all …]
/wasmtime-44.0.1/crates/wast/src/
H A Dspectest.rs134 move |_, rep| { in link_component_spectest()
136 state.last_drop.store(rep, SeqCst); in link_component_spectest()
157 i.func_wrap("[constructor]resource1", |_cx, (rep,): (u32,)| { in link_component_spectest()
158 Ok((Resource::<Resource1>::new_own(rep),)) in link_component_spectest()
162 |_cx, (resource, rep): (Resource<Resource1>, u32)| { in link_component_spectest()
163 assert_eq!(resource.rep(), rep); in link_component_spectest()
177 |_cx, (resource, rep): (Resource<Resource1>, u32)| { in link_component_spectest()
179 assert_eq!(resource.rep(), rep); in link_component_spectest()
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/func/
H A Doptions.rs217 rep: u32, in guest_resource_lower_own()
219 self.resource_tables().guest_resource_lower_own(rep, ty) in guest_resource_lower_own()
227 rep: u32, in guest_resource_lower_borrow()
238 return Ok(rep); in guest_resource_lower_borrow()
240 self.resource_tables().guest_resource_lower_borrow(rep, ty) in guest_resource_lower_borrow()
262 rep: u32, in host_resource_lower_own()
267 .host_resource_lower_own(rep, dtor, instance) in host_resource_lower_own()
433 rep: u32, in host_resource_lower_own()
438 .host_resource_lower_own(rep, dtor, instance) in host_resource_lower_own()
443 pub fn host_resource_lower_borrow(&mut self, rep: u32) -> Result<HostResourceIndex> { in host_resource_lower_borrow()
[all …]
/wasmtime-44.0.1/tests/misc_testsuite/component-model/
H A Dresources.wast6 (core func $rep (canon resource.rep $r))
11 (import "" "rep" (func $rep (param i32) (result i32)))
29 (export "rep" (func $rep))
61 (core func $rep (canon resource.rep $r))
64 (import "" "rep" (func $rep (param i32) (result i32)))
72 (export "rep" (func $rep))
83 (core func $rep (canon resource.rep $r))
159 (export "rep" (func $rep))
970 (core func $rep (canon resource.rep $t))
987 (export "rep" (func $rep))
[all …]
/wasmtime-44.0.1/crates/component-macro/tests/expanded/
H A Dunstable-features.rs89 fn drop(&mut self, rep: wasmtime::component::Resource<Baz>) -> wasmtime::Result<()>; in drop()
95 fn drop(&mut self, rep: wasmtime::component::Resource<Baz>) -> wasmtime::Result<()> { in drop()
96 HostBaz::drop(*self, rep) in drop()
291 move |mut store, rep| -> wasmtime::Result<()> { in add_to_linker_imports()
292 let resource = wasmtime::component::Resource::new_own(rep); in add_to_linker_imports()
405 rep: wasmtime::component::Resource<Bar>, in drop()
414 rep: wasmtime::component::Resource<Bar>, in drop()
416 HostBar::drop(*self, rep) in drop()
448 move |mut store, rep| -> wasmtime::Result<()> { in add_to_linker()
449 let resource = wasmtime::component::Resource::new_own(rep); in add_to_linker()
H A Dresources-import.rs13 rep: wasmtime::component::Resource<WorldResource>, in drop()
28 rep: wasmtime::component::Resource<WorldResource>, in drop()
30 HostWorldResource::drop(*self, rep) in drop()
392 rep: wasmtime::component::Resource<Bar>, in drop()
410 rep: wasmtime::component::Resource<Bar>, in drop()
412 HostBar::drop(*self, rep) in drop()
501 HostFallible::drop(*self, rep) in drop()
955 rep: wasmtime::component::Resource<A>, in drop()
961 rep: wasmtime::component::Resource<A>, in drop()
963 HostA::drop(*self, rep) in drop()
[all …]
H A Dunstable-features_async.rs94 rep: wasmtime::component::Resource<Baz>, in drop()
106 rep: wasmtime::component::Resource<Baz>, in drop()
108 HostBaz::drop(*self, rep).await in drop()
303 move |mut store, rep| { in add_to_linker_imports()
308 wasmtime::component::Resource::new_own(rep), in add_to_linker_imports()
429 rep: wasmtime::component::Resource<Bar>, in drop()
441 rep: wasmtime::component::Resource<Bar>, in drop()
443 HostBar::drop(*self, rep).await in drop()
475 move |mut store, rep| { in add_to_linker()
480 wasmtime::component::Resource::new_own(rep), in add_to_linker()
H A Dunstable-features_tracing_async.rs94 rep: wasmtime::component::Resource<Baz>, in drop()
106 rep: wasmtime::component::Resource<Baz>, in drop()
108 HostBaz::drop(*self, rep).await in drop()
303 move |mut store, rep| { in add_to_linker_imports()
308 wasmtime::component::Resource::new_own(rep), in add_to_linker_imports()
458 rep: wasmtime::component::Resource<Bar>, in drop()
470 rep: wasmtime::component::Resource<Bar>, in drop()
472 HostBar::drop(*self, rep).await in drop()
504 move |mut store, rep| { in add_to_linker()
509 wasmtime::component::Resource::new_own(rep), in add_to_linker()
H A Dresources-import_async.rs20 rep: wasmtime::component::Resource<WorldResource>, in drop()
42 rep: wasmtime::component::Resource<WorldResource>, in drop()
44 HostWorldResource::drop(*self, rep).await in drop()
293 move |mut store, rep| { in add_to_linker_imports()
463 HostBar::drop(*self, rep).await in drop()
792 move |mut store, rep| { in add_to_linker()
807 move |mut store, rep| { in add_to_linker()
1127 HostA::drop(*self, rep).await in drop()
1150 move |mut store, rep| { in add_to_linker()
1285 HostFoo::drop(*self, rep).await in drop()
[all …]
H A Dresources-import_tracing_async.rs20 rep: wasmtime::component::Resource<WorldResource>, in drop()
42 rep: wasmtime::component::Resource<WorldResource>, in drop()
44 HostWorldResource::drop(*self, rep).await in drop()
293 move |mut store, rep| { in add_to_linker_imports()
526 HostBar::drop(*self, rep).await in drop()
855 move |mut store, rep| { in add_to_linker()
870 move |mut store, rep| { in add_to_linker()
1531 HostA::drop(*self, rep).await in drop()
1554 move |mut store, rep| { in add_to_linker()
1702 HostFoo::drop(*self, rep).await in drop()
[all …]
H A Dunstable-features_concurrent.rs85 rep: wasmtime::component::Resource<Baz>, in drop()
282 move |caller: &wasmtime::component::Accessor<T>, rep| { in add_to_linker_imports()
288 wasmtime::component::Resource::new_own(rep), in add_to_linker_imports()
400 rep: wasmtime::component::Resource<Bar>, in drop()
434 move |caller: &wasmtime::component::Accessor<T>, rep| { in add_to_linker()
440 wasmtime::component::Resource::new_own(rep), in add_to_linker()
/wasmtime-44.0.1/tests/all/component_model/
H A Dbindgen.rs362 0 => assert_eq!(val.rep(), 40), in run()
363 1 => assert_eq!(val.rep(), 80), in run()
467 0 => assert_eq!(val.rep(), 40), in run()
468 1 => assert_eq!(val.rep(), 80), in run()
627 self.hostcalls.push(Hostcall::DropRootX(val.rep())); in drop()
634 let rep = self.next_a_x; in new() localVariable
637 Resource::new_own(rep) in new()
641 self.hostcalls.push(Hostcall::DropAX(val.rep())); in drop()
774 assert_eq!(ret.rep(), 2); in run()
780 assert_eq!(ret.rep(), 4); in run()
H A Dresources.rs471 data.last_drop = Some(rep); in manually_destroy()
610 assert_eq!(resource.rep(), 100); in dynamic_val()
629 assert_eq!(resource.rep(), 100); in dynamic_val()
643 assert_eq!(t1.rep(), 100); in dynamic_val()
658 assert_eq!(resource.rep(), 100); in dynamic_val()
824 assert_eq!(r.rep(), 100); in thread_through_borrow()
1494 assert_eq!(r1.rep(), 100); in guest_different_host_same()
1495 assert_eq!(r2.rep(), 100); in guest_different_host_same()
1556 assert_eq!(r.rep(), 100); in resource_any_to_typed_handles_borrow()
1572 assert_eq!(r.rep(), 1); in resource_dynamic()
[all …]
/wasmtime-44.0.1/crates/debugger/src/host/
H A Dapi.rs294 self.delete(rep)?; in drop()
402 self.delete(rep)?; in drop()
446 self.delete(rep)?; in drop()
630 self.delete(rep)?; in drop()
673 self.delete(rep)?; in drop()
720 self.delete(rep)?; in drop()
752 self.delete(rep)?; in drop()
810 self.delete(rep)?; in drop()
848 self.delete(rep)?; in drop()
928 self.delete(rep)?; in drop()
[all …]
/wasmtime-44.0.1/crates/c-api/tests/component/
H A Dvalues.cc862 EXPECT_EQ(r.rep(), rep); in TEST()
878 EXPECT_EQ(rep, 42); in TEST()
963 (func (export "rep") (param i32) (result i32) in TEST()
979 (func (export "rep") (param "x" (borrow $r)) (result u32) in TEST()
980 (canon lift (core func $b "rep"))) in TEST()
983 (func (export "last-dtor-rep") (result u32) in TEST()
984 (canon lift (core func $a "last-dtor-rep"))) in TEST()
1062 EXPECT_EQ(r1.rep(), 1); in TEST()
1067 EXPECT_EQ(r1.rep(), 1); in TEST()
1070 EXPECT_EQ(r2.rep(), 1); in TEST()
[all …]
/wasmtime-44.0.1/crates/c-api/src/component/
H A Dval.rs446 let rep = self.resource.rep(); in resource() localVariable
449 ResourceDynamic::new_own(rep, ty) in resource()
451 ResourceDynamic::new_borrow(rep, ty) in resource()
459 rep: u32, in wasmtime_component_resource_host_new()
464 ResourceDynamic::new_own(rep, ty) in wasmtime_component_resource_host_new()
466 ResourceDynamic::new_borrow(rep, ty) in wasmtime_component_resource_host_new()
484 resource.resource.rep() in wasmtime_component_resource_host_rep()

123