MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / insert_many

Method insert_many

winch/codegen/src/stack.rs:363–371  ·  view source on GitHub ↗

Inserts many values at the given index.

(&mut self, at: usize, values: &[Val])

Source from the content-addressed store, hash-verified

361
362 /// Inserts many values at the given index.
363 pub fn insert_many(&mut self, at: usize, values: &[Val]) {
364 debug_assert!(at <= self.len());
365
366 if at == self.len() {
367 self.inner.extend_from_slice(values);
368 } else {
369 self.inner.insert_from_slice(at, values);
370 }
371 }
372
373 /// Get the length of the stack.
374 pub fn len(&self) -> usize {

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected