MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / write_64

Method write_64

crates/tinywasm/src/store/memory/mod.rs:240–246  ·  view source on GitHub ↗

Writes exactly 8 bytes at the effective address `base + offset`.

(&mut self, base: u64, offset: u64, bytes: [u8; 8])

Source from the content-addressed store, hash-verified

238
239 /// Writes exactly 8 bytes at the effective address `base + offset`.
240 fn write_64(&mut self, base: u64, offset: u64, bytes: [u8; 8]) -> core::result::Result<(), crate::Trap> {
241 let addr = checked_effective_addr::<8>(self.len(), base, offset)?;
242 self.write_all(addr, &bytes).ok_or_else(|| {
243 cold_path();
244 memory_oob(addr, 8, self.len())
245 })
246 }
247
248 /// Writes exactly 16 bytes at the effective address `base + offset`.
249 fn write_128(&mut self, base: u64, offset: u64, bytes: [u8; 16]) -> core::result::Result<(), crate::Trap> {

Callers

nothing calls this directly

Implementers 3

vec.rscrates/tinywasm/src/store/memory/vec.r
paged.rscrates/tinywasm/src/store/memory/paged
lazy.rscrates/tinywasm/src/store/memory/lazy.

Calls 3

memory_oobFunction · 0.85
lenMethod · 0.45
write_allMethod · 0.45

Tested by

no test coverage detected