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

Method write_128

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

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

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

Source from the content-addressed store, hash-verified

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> {
250 let addr = checked_effective_addr::<16>(self.len(), base, offset)?;
251 self.write_all(addr, &bytes).ok_or_else(|| {
252 cold_path();
253 memory_oob(addr, 16, self.len())
254 })
255 }
256}
257
258type MemoryFactory = dyn Fn(MemoryType) -> Result<Box<dyn LinearMemory>> + Send + Sync;

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