Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 272) sorted by relevance

1234567891011

/wasmtime-44.0.1/crates/c-api/include/wasmtime/
H A Dconfig.hh93 ptr.get(), size); in linear_memory_keep_resident()
119 ptr.get(), size); in max_component_instance_size()
128 ptr.get(), count); in max_core_instances_per_component()
250 Config() : ptr(wasm_config_new()) {} in Config()
257 wasmtime_config_debug_info_set(ptr.get(), enable); in debug_info()
273 wasmtime_config_consume_fuel_set(ptr.get(), enable); in consume_fuel()
280 wasmtime_config_max_wasm_stack_set(ptr.get(), stack); in max_wasm_stack()
288 wasmtime_config_wasm_threads_set(ptr.get(), enable); in wasm_threads()
318 wasmtime_config_wasm_simd_set(ptr.get(), enable); in wasm_simd()
435 wasmtime_config_strategy_set(ptr.get(), in strategy()
[all …]
H A Dstore.hh49 static void finalizer(void *ptr) { in finalizer() argument
50 std::unique_ptr<std::any> _ptr(static_cast<std::any *>(ptr)); in finalizer()
56 : ptr(wasmtime_store_new(engine.capi(), nullptr, finalizer)) {} in Store()
82 wasmtime_context_t *ptr; member in wasmtime::Store::Context
86 explicit Context(wasmtime_context_t *ptr) : ptr(ptr) {} in Context() argument
100 auto *error = wasmtime_context_gc(ptr); in gc()
114 auto *error = wasmtime_context_set_fuel(ptr, fuel); in set_fuel()
126 auto *error = wasmtime_context_get_fuel(ptr, &fuel); in get_fuel()
188 const wasmtime_context_t *capi() const { return ptr; } in capi()
191 wasmtime_context_t *capi() { return ptr; } in capi()
[all …]
H A Dhelpers.hh18 std::unique_ptr<Raw, deleter> ptr; \
24 explicit name(Raw *raw) : ptr(raw) {} \
41 const Raw *capi() const { return ptr.get(); } \
46 Raw *capi() { return ptr.get(); } \
51 Raw *capi_release() { return ptr.release(); } \
69 name(const name &other) : ptr(capi_type##_clone(other.ptr.get())) {} \
75 ptr.reset(capi_type##_clone(other.ptr.get())); \
86 return capi_type##_equal(ptr.get(), other.ptr.get()); \
H A Dlinker.hh36 wasmtime_linker_allow_shadowing(ptr.get(), allow); in allow_shadowing()
45 wasmtime_linker_define(ptr.get(), cx.ptr, module.data(), module.size(), in define()
59 auto *error = wasmtime_linker_define_wasi(ptr.get()); in define_wasi()
72 ptr.get(), cx.ptr, name.data(), name.size(), &instance.instance); in define_instance()
84 auto *error = wasmtime_linker_instantiate(ptr.get(), cx.ptr, m.capi(), in instantiate()
99 auto *error = wasmtime_linker_module(ptr.get(), cx.ptr, name.data(), in module()
112 if (wasmtime_linker_get(ptr.get(), cx.ptr, module.data(), module.size(), in get()
132 ty.ptr.get(), Func::raw_callback<std::remove_reference_t<F>>, in func_new()
173 auto *error = wasmtime_linker_get_default(ptr.get(), cx.ptr, name.data(), in get_default()
185 ptr.get(), module.capi()); in define_unknown_imports_as_traps()
[all …]
H A Dwasi.hh28 WasiConfig() : ptr(wasi_config_new()) {} in WasiConfig()
38 wasi_config_set_argv(ptr.get(), (int)args.size(), ptrs.data()); in argv()
42 void inherit_argv() { wasi_config_inherit_argv(ptr.get()); } in inherit_argv()
54 wasi_config_set_env(ptr.get(), (int)env.size(), names.data(), in env()
60 void inherit_env() { wasi_config_inherit_env(ptr.get()); } in inherit_env()
65 return wasi_config_set_stdin_file(ptr.get(), path.c_str()); in stdin_file()
70 void inherit_stdin() { return wasi_config_inherit_stdin(ptr.get()); } in inherit_stdin()
75 return wasi_config_set_stdout_file(ptr.get(), path.c_str()); in stdout_file()
80 void inherit_stdout() { return wasi_config_inherit_stdout(ptr.get()); } in inherit_stdout()
85 return wasi_config_set_stderr_file(ptr.get(), path.c_str()); in stderr_file()
[all …]
/wasmtime-44.0.1/crates/c-api/include/wasmtime/types/
H A Dtable.hh23 std::unique_ptr<wasm_tabletype_t, deleter> ptr; member in wasmtime::TableType
31 const wasm_tabletype_t *ptr; member in wasmtime::TableType::Ref
35 Ref(const wasm_tabletype_t *ptr) : ptr(ptr) {} in Ref() argument
37 Ref(const TableType &ty) : Ref(ty.ptr.get()) {} in Ref()
57 TableType(wasm_tabletype_t *ptr) : ptr(ptr), ref(ptr) {} in TableType() argument
66 ptr.reset(wasm_tabletype_new(ty.ptr.release(), &limits)); in TableType()
67 ref = ptr.get(); in TableType()
72 : ptr(nullptr), ref(nullptr) { in TableType()
76 ptr.reset(wasm_tabletype_new(ty.ptr.release(), &limits)); in TableType()
77 ref = ptr.get(); in TableType()
[all …]
H A Dmemory.hh40 Ref() : ptr(nullptr) {} in Ref()
44 Ref(const wasm_memorytype_t *ptr) : ptr(ptr) {} in Ref() argument
79 MemoryType(wasm_memorytype_t *ptr) : ptr(ptr), ref(ptr) {} in MemoryType() argument
90 ptr.reset(p); in MemoryType()
91 ref.ptr = p; in MemoryType()
101 ptr.reset(p); in MemoryType()
102 ref.ptr = p; in MemoryType()
110 assert(ptr != nullptr); in New64()
111 return MemoryType(ptr); in New64()
119 assert(ptr != nullptr); in New64()
[all …]
H A Dtag.hh28 std::unique_ptr<wasm_tagtype_t, deleter> ptr; member in wasmtime::TagType
35 const wasm_tagtype_t *ptr; member in wasmtime::TagType::Ref
39 Ref(const wasm_tagtype_t *ptr) : ptr(ptr) {} in Ref() argument
41 Ref(const TagType &ty) : Ref(ty.ptr.get()) {} in Ref()
47 return FuncType(wasm_functype_copy(wasm_tagtype_functype(ptr))); in functype()
53 TagType(wasm_tagtype_t *ptr) : ptr(ptr), ref(ptr) {} in TagType() argument
59 : TagType(wasm_tagtype_new(wasm_functype_copy(functype.ptr.get()))) {} in TagType()
62 TagType(Ref other) : TagType(wasm_tagtype_copy(other.ptr)) {} in TagType()
64 TagType(const TagType &other) : TagType(wasm_tagtype_copy(other.ptr.get())) {} in TagType()
67 ptr.reset(wasm_tagtype_copy(other.ptr.get())); in operator =()
[all …]
H A Dglobal.hh22 std::unique_ptr<wasm_globaltype_t, deleter> ptr; member in wasmtime::GlobalType
29 const wasm_globaltype_t *ptr; member in wasmtime::GlobalType::Ref
33 Ref(const wasm_globaltype_t *ptr) : ptr(ptr) {} in Ref() argument
35 Ref(const GlobalType &ty) : Ref(ty.ptr.get()) {} in Ref()
39 return wasm_globaltype_mutability(ptr) == WASM_VAR; in is_mutable()
43 ValType::Ref content() const { return wasm_globaltype_content(ptr); } in content()
48 GlobalType(wasm_globaltype_t *ptr) : ptr(ptr), ref(ptr) {} in GlobalType() argument
54 ty.ptr.release(), in GlobalType()
57 GlobalType(Ref other) : GlobalType(wasm_globaltype_copy(other.ptr)) {} in GlobalType()
60 : GlobalType(wasm_globaltype_copy(other.ptr.get())) {} in GlobalType()
[all …]
H A Dfunc.hh24 std::unique_ptr<wasm_functype_t, deleter> ptr; member in wasmtime::FuncType
31 const wasm_functype_t *ptr; member in wasmtime::FuncType::Ref
35 Ref(const wasm_functype_t *ptr) : ptr(ptr) {} in Ref() argument
37 Ref(const FuncType &ty) : Ref(ty.ptr.get()) {} in Ref()
40 ValType::ListRef params() const { return wasm_functype_params(ptr); } in params()
48 FuncType(wasm_functype_t *ptr) : ptr(ptr), ref(ptr) {} in FuncType() argument
59 FuncType(Ref other) : FuncType(wasm_functype_copy(other.ptr)) {} in FuncType()
62 : FuncType(wasm_functype_copy(other.ptr.get())) {} in FuncType()
65 ptr.reset(wasm_functype_copy(other.ptr.get())); in operator =()
84 param_vec.data[i++] = val.ptr.release(); // NOLINT in from_iters()
[all …]
H A Dval.hh78 std::unique_ptr<wasm_valtype_t, deleter> ptr; member in wasmtime::ValType
98 const wasm_valtype_t *ptr; member in wasmtime::ValType::Ref
102 Ref(const wasm_valtype_t *ptr) : ptr(ptr) {} in Ref() argument
104 Ref(const ValType &ty) : Ref(ty.ptr.get()) {} in Ref()
108 switch (wasm_valtype_kind(ptr)) { in kind()
147 ValType(wasm_valtype_t *ptr) : ptr(ptr), ref(ptr) {} in ValType() argument
153 ValType(Ref other) : ValType(wasm_valtype_copy(other.ptr)) {} in ValType()
155 ValType(const ValType &other) : ValType(wasm_valtype_copy(other.ptr.get())) {} in ValType()
158 ptr.reset(wasm_valtype_copy(other.ptr.get())); in operator =()
/wasmtime-44.0.1/crates/core/src/error/
H A Dptr.rs17 ptr: NonNull<T>, field
22 OwnedPtr { ptr } in new()
26 OwnedPtr::new(self.ptr.cast()) in cast()
31 Self::new(self.ptr) in raw_copy()
35 self.ptr in into_non_null()
42 unsafe { self.ptr.as_ref() } in as_ref()
60 ptr: NonNull<T>, field
88 ptr, in new()
114 ptr: NonNull<T>, field
124 ptr, in new()
[all …]
H A Dboxed.rs4 use core::ptr::NonNull;
17 let ptr = unsafe { std_alloc::alloc::alloc(layout) }; in try_alloc() localVariable
19 if let Some(ptr) = NonNull::new(ptr) { in try_alloc()
20 Ok(ptr) in try_alloc()
37 let ptr = unsafe { try_alloc(layout)? }; in try_new_uninit_box() localVariable
39 let ptr = ptr.cast::<MaybeUninit<T>>(); in try_new_uninit_box() localVariable
42 Ok(unsafe { Box::from_raw(ptr.as_ptr()) }) in try_new_uninit_box()
/wasmtime-44.0.1/crates/core/src/
H A Dalloc.rs25 use core::{alloc::Layout, ptr::NonNull};
39 if let Some(ptr) = NonNull::new(ptr) { in try_alloc()
40 Ok(ptr) in try_alloc()
56 ptr: *mut u8, in try_realloc()
63 let ptr = unsafe { std_alloc::alloc::realloc(ptr, layout, new_size) }; in try_realloc() localVariable
65 if let Some(ptr) = NonNull::new(ptr) { in try_realloc()
66 Ok(ptr) in try_realloc()
103 let ptr: *mut [u8] = core::ptr::slice_from_raw_parts_mut(ptr, len); in str_ptr_from_raw_parts() localVariable
104 str_ptr_from_slice_ptr(ptr) in str_ptr_from_raw_parts()
114 let ptr: *mut str = unsafe { core::mem::transmute(ptr) }; in str_ptr_from_slice_ptr() localVariable
[all …]
/wasmtime-44.0.1/crates/wiggle/test-helpers/src/
H A Dlib.rs93 ptr: start, in invert()
101 ptr: start, in invert()
124 pub ptr: u32, field
136 start: self.ptr, in overlapping()
141 start: b.ptr, in overlapping()
179 let start = self.ptr; in inside()
215 &[MemArea { ptr: 0, len: 1 }, MemArea { ptr: 2, len: 4094 }], in invert()
224 &[MemArea { ptr: 0, len: 1 }, MemArea { ptr: 1, len: 4095 }], in invert()
229 &[MemArea { ptr: 1, len: 2 }, MemArea { ptr: 4, len: 1 }], in invert()
281 assert!(i.ptr >= r.ptr);
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/miri/
H A Dvm.rs8 pub unsafe fn expose_existing_mapping(ptr: *mut u8, len: usize) -> io::Result<()> { in expose_existing_mapping()
10 std::ptr::write_bytes(ptr, 0u8, len); in expose_existing_mapping()
15 pub unsafe fn hide_existing_mapping(ptr: *mut u8, len: usize) -> io::Result<()> { in hide_existing_mapping()
17 std::ptr::write_bytes(ptr, 0, len); in hide_existing_mapping()
22 pub unsafe fn erase_existing_mapping(ptr: *mut u8, len: usize) -> io::Result<()> { in erase_existing_mapping()
24 std::ptr::write_bytes(ptr, 0, len); in erase_existing_mapping()
30 pub unsafe fn commit_pages(ptr: *mut u8, len: usize) -> io::Result<()> { in commit_pages()
32 std::ptr::write_bytes(ptr, 0, len); in commit_pages()
37 pub unsafe fn decommit_pages(ptr: *mut u8, len: usize) -> io::Result<()> { in decommit_pages()
39 std::ptr::write_bytes(ptr, 0, len); in decommit_pages()
/wasmtime-44.0.1/crates/wiggle/src/
H A Dguest_type.rs41 fn read(mem: &GuestMemory, ptr: GuestPtr<Self>) -> Result<Self, GuestError>; in read()
76 let offset = ptr.offset();
99 let offset = ptr.offset();
162 let offset = u32::read(mem, ptr.cast())?; in read()
167 u32::write(mem, ptr.cast(), val.offset()) in write()
187 let ptr = ptr.cast::<u32>(); in read() localVariable
188 let offset = u32::read(mem, ptr)?; in read()
189 let len = u32::read(mem, ptr.add(1)?)?; in read()
195 let ptr = ptr.cast::<u32>(); in write() localVariable
196 u32::write(mem, ptr, offset)?; in write()
[all …]
H A Dlib.rs67 T::read(self, ptr) in read()
83 T::write(self, ptr, val) in write()
132 let range = self.validate_range::<u8>(ptr.pointer.0, ptr.pointer.1)?; in as_slice()
141 match self.as_slice(ptr.cast())? { in as_str()
153 let range = self.validate_range::<u8>(ptr.pointer.0, ptr.pointer.1)?; in as_slice_mut()
168 let guest = self.validate_size_align::<T>(ptr.pointer.0, ptr.pointer.1)?; in to_vec()
211 let guest = self.validate_size_align::<T>(ptr.pointer.0, ptr.pointer.1)?; in copy_from_slice()
585 assert_eq!(ptr as usize, 5); in run_in_dummy_executor()
587 RawWaker::new(ptr, &VTABLE) in run_in_dummy_executor()
590 unsafe fn wake(ptr: *const ()) { in run_in_dummy_executor()
[all …]
/wasmtime-44.0.1/cranelift/jit/src/memory/
H A Darena.rs3 use std::ptr;
16 ptr: *mut u8, field
29 ptr, in new()
72 let ptr = unsafe { self.ptr.add(self.position) }; in allocate() localVariable
74 ptr in allocate()
120 ptr, in new_with_size()
175 let ptr = unsafe { self.ptr.add(self.position) }; in allocate_segment() localVariable
199 if self.ptr == ptr::null_mut() { in free_memory()
205 self.ptr = ptr::null_mut(); in free_memory()
211 if self.ptr == ptr::null_mut() { in drop()
[all …]
H A Dsystem.rs10 use std::ptr;
19 ptr: *mut u8, field
30 ptr: ptr::null_mut(), in new()
60 if !ptr.is_null() { in with_size()
62 ptr, in with_size()
77 let ptr = unsafe { in with_size() localVariable
85 if !ptr.is_null() { in with_size()
87 ptr: ptr as *mut u8, in with_size()
152 let ptr = unsafe { self.current.ptr.add(self.position) }; in allocate() localVariable
154 return Ok(ptr); in allocate()
[all …]
/wasmtime-44.0.1/crates/environ/src/component/
H A Dvmcomponent_offsets.rs36 pub ptr: P, field
88 pub fn new(ptr: P, component: &Component) -> Self { in new()
90 ptr, in new()
165 align(u32::from(ret.ptr.size())), in new()
166 size(builtins) = ret.ptr.size(), in new()
167 size(vm_store_context) = ret.ptr.size(), in new()
170 size(task_may_block) = ret.ptr.size_of_vmglobal_definition(), in new()
171 align(u32::from(ret.ptr.size())), in new()
196 self.ptr.size() in pointer_size()
284 2 * self.ptr.size() in lowering_size()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/custom/
H A Dvm.rs6 use core::ptr::{self, NonNull};
12 pub unsafe fn expose_existing_mapping(ptr: *mut u8, len: usize) -> Result<()> { in expose_existing_mapping()
15 ptr.cast(), in expose_existing_mapping()
22 pub unsafe fn hide_existing_mapping(ptr: *mut u8, len: usize) -> Result<()> { in hide_existing_mapping()
23 unsafe { cvt(capi::wasmtime_mprotect(ptr.cast(), len, 0)) } in hide_existing_mapping()
27 unsafe { cvt(capi::wasmtime_mmap_remap(ptr.cast(), len, 0)) } in erase_existing_mapping()
73 let mut ptr = ptr::null_mut(); in from_data() localVariable
77 &mut ptr, in from_data()
79 match NonNull::new(ptr) { in from_data()
80 Some(ptr) => Ok(Some(MemoryImageSource { in from_data()
[all …]
/wasmtime-44.0.1/crates/wiggle/tests/
H A Dlists.rs90 .write(GuestPtr::new(ptr.ptr), excuse) in test()
101 .write(slot, GuestPtr::new(ptr.ptr)) in test()
178 self.array_ptr_loc.ptr, in test()
181 for (ptr, val) in ptr.iter().zip(&self.elements) { in test()
310 let ptr = in test() localVariable
312 for (ptr, val) in ptr.iter().zip(&self.elements) { in test()
321 self.element_loc.ptr as i32, in test()
324 self.return_loc.ptr as i32, in test()
344 self.return_loc.ptr as i32, in test()
360 self.return_loc.ptr as i32, in test()
[all …]
H A Drecords.rs132 self.input_loc.ptr as i32, in test()
133 self.return_loc.ptr as i32, in test()
220 self.input_first_loc.ptr, in test()
226 self.input_second_loc.ptr, in test()
233 self.input_struct_loc.ptr as i32, in test()
234 self.return_loc.ptr as i32, in test()
303 self.input_first_loc.ptr, in test()
317 self.return_loc.ptr as i32, in test()
436 self.return_loc.ptr as i32, in test()
532 self.input_array_loc.ptr, in test()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/
H A Dstack_switching.rs6 use core::{marker::PhantomPinned, ptr::NonNull};
169 data: core::ptr::null_mut(), in empty()
258 let last_ancestor = core::ptr::null_mut(); in empty()
490 VMStackChain::Continuation(ptr) => { in next()
493 Some(ptr) in next()
510 VMStackChain::Continuation(ptr) => { in next()
597 .ptr in check_vm_common_stack_information_offsets()
622 usize::from(offsets.ptr.vmhostarray_data()) in check_vm_array_offsets()
670 usize::from(offsets.ptr.vmcontref_stack()) in check_vm_contref_offsets()
674 usize::from(offsets.ptr.vmcontref_args()) in check_vm_contref_offsets()
[all …]

1234567891011