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

Method push

crates/wasmtime/src/runtime/instance.rs:694–716  ·  view source on GitHub ↗
(&mut self, item: &Extern, store: &mut StoreOpaque)

Source from the content-addressed store, hash-verified

692 }
693
694 fn push(&mut self, item: &Extern, store: &mut StoreOpaque) -> Result<(), OutOfMemory> {
695 match item {
696 Extern::Func(i) => {
697 self.functions.push(i.vmimport(store))?;
698 }
699 Extern::Global(i) => {
700 self.globals.push(i.vmimport(store))?;
701 }
702 Extern::Table(i) => {
703 self.tables.push(i.vmimport(store))?;
704 }
705 Extern::Memory(i) => {
706 self.memories.push(i.vmimport(store))?;
707 }
708 Extern::SharedMemory(i) => {
709 self.memories.push(i.vmimport(store))?;
710 }
711 Extern::Tag(i) => {
712 self.tags.push(i.vmimport(store))?;
713 }
714 }
715 Ok(())
716 }
717
718 /// Note that this is unsafe as the validity of `item` is not verified and
719 /// it contains a bunch of raw pointers.

Callers 4

typecheck_externsMethod · 0.45
push_exportMethod · 0.45
newMethod · 0.45
pre_instantiate_rawFunction · 0.45

Calls 2

OkFunction · 0.85
vmimportMethod · 0.45

Tested by

no test coverage detected