| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/ |
| H A D | component.rs | 29 use core::ptr::NonNull; 190 vmctx: NonNull<VMOpaqueContext>, 191 data: NonNull<u8>, 279 unsafe fn from_vmctx(vmctx: NonNull<VMComponentContext>) -> NonNull<ComponentInstance> { in from_vmctx() 323 store: NonNull<dyn VMStore>, in new() 520 ptr: NonNull<VMMemoryDefinition>, in set_runtime_memory() 534 ptr: NonNull<VMFuncRef>, in set_runtime_realloc() 548 ptr: NonNull<VMFuncRef>, in set_runtime_callback() 562 ptr: NonNull<VMFuncRef>, in set_runtime_post_return() 1022 pub unsafe fn from_opaque(opaque: NonNull<VMOpaqueContext>) -> NonNull<VMComponentContext> { in from_opaque() [all …]
|
| H A D | debug_builtins.rs | 4 use core::ptr::NonNull; 8 static mut VMCTX_AND_MEMORY: (NonNull<VMContext>, usize) = (NonNull::dangling(), 0); 18 VMCTX_AND_MEMORY.0 != NonNull::dangling(), in resolve_vmctx_memory_ptr() 38 VMCTX_AND_MEMORY = (NonNull::new(vmctx_ptr).unwrap(), 0); in set_vmctx_memory()
|
| H A D | interpreter_disabled.rs | 12 use core::ptr::NonNull; 47 _bytecode: NonNull<u8>, in call() 48 _callee: NonNull<VMOpaqueContext>, in call() 49 _caller: NonNull<VMContext>, in call() 50 _args_and_results: NonNull<[ValRaw]>, in call()
|
| H A D | provenance.rs | 48 use core::ptr::NonNull; 109 pub fn as_non_null(&self) -> NonNull<T> { in as_non_null() 111 unsafe { NonNull::new_unchecked(ptr) } in as_non_null() 121 NonNull::dangling().into() in dangling() 142 impl<T> From<NonNull<T>> for VmPtr<T> { 143 fn from(ptr: NonNull<T>) -> VmPtr<T> { in from()
|
| H A D | send_sync_ptr.rs | 3 use core::ptr::{self, NonNull}; 9 pub struct SendSyncPtr<T: ?Sized>(NonNull<T>); 17 pub fn new(ptr: NonNull<T>) -> SendSyncPtr<T> { in new() 43 pub fn as_non_null(&self) -> NonNull<T> { in as_non_null() 64 U: Into<NonNull<T>>,
|
| H A D | store_box.rs | 4 use core::ptr::NonNull; 21 Ok(StoreBox(SendSyncPtr::from(NonNull::new(ptr).unwrap()))) in new() 27 pub fn get(&self) -> NonNull<T> { in get()
|
| H A D | interpreter.rs | 8 use core::ptr::NonNull; 96 vm: NonNull<VmState>, 170 mut bytecode: NonNull<u8>, in call() 171 callee: NonNull<VMOpaqueContext>, in call() 172 caller: NonNull<VMContext>, in call() 173 args_and_results: NonNull<[ValRaw]>, in call() 335 (@get nonnull $reg:expr) => (NonNull::new($reg.get_ptr()).unwrap()); in call_indirect_host() 457 fn trap(&mut self, pc: NonNull<u8>, kind: Option<TrapKind>) -> NonNull<u8> { in trap() 502 fn take_resume_at_pc(&mut self) -> NonNull<u8> { in take_resume_at_pc() 505 NonNull::new(pc).unwrap() in take_resume_at_pc()
|
| H A D | vmcontext.rs | 17 use core::ptr::{self, NonNull}; 47 NonNull<VMOpaqueContext>, 48 NonNull<VMContext>, 49 NonNull<ValRaw>, 913 me: NonNull<VMFuncRef>, in array_call() 915 caller: NonNull<VMContext>, in array_call() 925 me: NonNull<VMFuncRef>, in array_call_interpreted() 927 caller: NonNull<VMContext>, in array_call_interpreted() 950 me: NonNull<VMFuncRef>, in array_call_native() 1400 pub unsafe fn from_opaque(opaque: NonNull<VMOpaqueContext>) -> NonNull<VMContext> { in from_opaque() [all …]
|
| H A D | instance.rs | 31 use core::ptr::NonNull; 246 pub(crate) unsafe fn from_vmctx(vmctx: NonNull<VMContext>) -> NonNull<Instance> { in from_vmctx() 277 vmctx: NonNull<VMContext>, in enter_host_from_wasm() 338 vmctx: NonNull<VMContext>, in sibling_vmctx_mut() 543 pub fn vmctx(&self) -> NonNull<VMContext> { in vmctx() 776 fn type_ids_array(&self) -> NonNull<VmPtr<VMSharedTypeIndex>> { in type_ids_array() 809 array_call: NonNull::from( in construct_func_ref() 817 NonNull::new( in construct_func_ref() 857 ) -> Option<NonNull<VMFuncRef>> { in get_func_ref() 1790 fn vmctx(&self) -> NonNull<Self::VMContext> { in vmctx() [all …]
|
| H A D | table.rs | 13 use core::ptr::{self, NonNull}; 58 fn from(ptr: Option<NonNull<VMFuncRef>>, lazy_init: bool) -> Self { in from() 72 fn into_funcref(self, lazy_init: bool) -> Option<Option<NonNull<VMFuncRef>>> { in into_funcref() 383 let data = SendSyncPtr::new(NonNull::slice_from_raw_parts( in new_static() 409 let data = SendSyncPtr::new(NonNull::slice_from_raw_parts( in new_static() 431 let data = SendSyncPtr::new(NonNull::slice_from_raw_parts( in new_static() 551 val: Option<NonNull<VMFuncRef>>, in fill_func() 762 pub fn get_func(&self, index: u64) -> Result<Option<NonNull<VMFuncRef>>, Trap> { in get_func() 775 ) -> Result<Option<Option<NonNull<VMFuncRef>>>, Trap> { in get_func_maybe_init() 929 base: NonNull::new(elements.as_mut_ptr()).unwrap().cast().into(), in vmtable() [all …]
|
| /wasmtime-44.0.1/crates/core/src/error/ |
| H A D | ptr.rs | 5 use core::{marker::PhantomData, ptr::NonNull}; 17 ptr: NonNull<T>, 21 pub(crate) fn new(ptr: NonNull<T>) -> Self { in new() 34 pub(crate) fn into_non_null(self) -> NonNull<T> { in into_non_null() 60 ptr: NonNull<T>, 86 pub(crate) fn new(ptr: NonNull<T>) -> Self { in new() 114 ptr: NonNull<T>, 122 pub(crate) fn new(ptr: NonNull<T>) -> Self { in new()
|
| H A D | boxed.rs | 4 use core::ptr::NonNull; 14 pub(crate) unsafe fn try_alloc(layout: Layout) -> Result<NonNull<u8>, OutOfMemory> { in try_alloc() 19 if let Some(ptr) = NonNull::new(ptr) { in try_alloc()
|
| H A D | error.rs | 11 ptr::NonNull, 59 unsafe fn ext_move(self, dest: NonNull<u8>); in ext_move() 1274 unsafe fn ext_move(self, dest: NonNull<u8>) { in ext_move() 1359 unsafe fn ext_move(self, dest: NonNull<u8>) { in ext_move() 1414 unsafe fn ext_move(self, dest: NonNull<u8>) { in ext_move() 1472 unsafe fn ext_move(self, dest: NonNull<u8>) { in ext_move() 1514 inner: NonNull<u8>, 1577 NonNull::new(inner).unwrap() in new_oom_ptr() 1585 fn is_oom_ptr(ptr: NonNull<u8>) -> bool { in is_oom_ptr() 1806 let ptr = NonNull::from(oom); in downcast_mut() [all …]
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/ |
| H A D | tls.rs | 22 use core::ptr::NonNull; 30 static STORAGE: Cell<Option<NonNull<SetStorage>>> = const { Cell::new(None) }; 34 Present(NonNull<dyn VMStore>), 46 let mut storage = SetStorage::Present(NonNull::from(store)); in set() 47 let _reset = ResetTls(STORAGE.with(|s| s.replace(Some(NonNull::from(&mut storage))))); in set() 50 struct ResetTls(Option<NonNull<SetStorage>>); in set() 153 struct ResetStorage(NonNull<SetStorage>, NonNull<dyn VMStore>); in try_get()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/vmcontext/ |
| H A D | vm_host_func_context.rs | 10 use core::ptr::NonNull; 42 array_call: NonNull::new(host_func as *mut u8).unwrap().cast().into(), in new() 45 vmctx: NonNull::dangling().into(), in new() 72 opaque: NonNull<VMOpaqueContext>, in from_opaque() 73 ) -> NonNull<VMArrayCallHostFuncContext> { in from_opaque()
|
| /wasmtime-44.0.1/crates/core/src/ |
| H A D | alloc.rs | 25 use core::{alloc::Layout, ptr::NonNull}; 34 unsafe fn try_alloc(layout: Layout) -> Result<NonNull<u8>, OutOfMemory> { in try_alloc() 39 if let Some(ptr) = NonNull::new(ptr) { in try_alloc() 59 ) -> Result<NonNull<u8>, OutOfMemory> { in try_realloc() 65 if let Some(ptr) = NonNull::new(ptr) { in try_realloc()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/ |
| H A D | fiber.rs | 9 use core::ptr::{self, NonNull}; 13 type WasmtimeResume = Result<NonNull<Context<'static>>>; 43 current_suspend: Option<NonNull<WasmtimeSuspend>>, 78 current_future_cx: Option<NonNull<Context<'static>>>, 637 ptr: Option<NonNull<WasmtimeSuspend>>, in replace_current_suspend() 638 ) -> Option<NonNull<WasmtimeSuspend>> { in replace_current_suspend() 644 ptr: Option<NonNull<Context<'static>>>, in replace_current_future_cx() 645 ) -> Option<NonNull<Context<'static>>> { in replace_current_future_cx() 655 current_suspend: Option<NonNull<WasmtimeSuspend>>, 656 current_future_cx: Option<NonNull<Context<'static>>>, [all …]
|
| /wasmtime-44.0.1/tests/all/ |
| H A D | stack_creator.rs | 5 ptr::NonNull, 16 base: NonNull<u8>, 22 fn new(base: NonNull<u8>, len: usize) -> Self { in new() 41 memory: NonNull<u8>, 59 let notnull = NonNull::new(mem); in new() 111 let base = NonNull::new(base_ptr).context("unable to compute stack base")?; in new_stack()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/store/ |
| H A D | func_refs.rs | 11 use core::ptr::NonNull; 94 ) -> Result<NonNull<VMFuncRef>, OutOfMemory> { in push() 161 ) -> Result<NonNull<VMFuncRef>, OutOfMemory> { in push_arc_host() 174 ) -> Result<NonNull<VMFuncRef>, OutOfMemory> { in push_box_host()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/unix/ |
| H A D | unwind.rs | 5 use core::ptr::NonNull; 99 let cur = NonNull::new(current.cast_mut()).unwrap(); in new() 111 let info = NonNull::new(unwind_info.cast_mut()).unwrap(); in new()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/stack_switching/stack/ |
| H A D | unix.rs | 61 use core::ptr::NonNull; 305 let func_ref = NonNull::new(func_ref).unwrap(); in fiber_start() 306 let caller_vmxtx = NonNull::new_unchecked(caller_vmctx); in fiber_start() 308 let params_and_returns: NonNull<[ValRaw]> = if args.capacity == 0 { in fiber_start() 309 NonNull::from(&[]) in fiber_start()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/ |
| H A D | mod.rs | 15 use core::ptr::{self, NonNull}; 44 let empty = NonNull::new(ptr::slice_from_raw_parts_mut( in empty_mmap()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/memory/ |
| H A D | shared_memory_disabled.rs | 6 use core::ptr::NonNull; 26 pub fn vmmemory_ptr(&self) -> NonNull<VMMemoryDefinition> { in vmmemory_ptr()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/windows/ |
| H A D | mmap.rs | 9 use std::ptr::{self, NonNull}; 57 let memory = SendSyncPtr::new(NonNull::new(memory).unwrap()); in new() 77 let memory = SendSyncPtr::new(NonNull::new(memory).unwrap()); in reserve() 128 let memory = SendSyncPtr::new(NonNull::new(memory).unwrap()); in from_file()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/ |
| H A D | component.rs | 15 use core::ptr::NonNull; 103 pub wasm_call: NonNull<VMWasmCallFunction>, 104 pub array_call: NonNull<VMArrayCallFunction>, 232 pub unsafe fn deserialize_raw(engine: &Engine, memory: NonNull<[u8]>) -> Result<Component> { in deserialize_raw() 539 fn store_invariant_func(&self, key: FuncKey) -> Option<NonNull<u8>> { in store_invariant_func() 551 fn func_loc_to_pointer(&self, loc: &FunctionLoc) -> NonNull<u8> { in func_loc_to_pointer() 554 NonNull::from(trampoline).cast() in func_loc_to_pointer()
|