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

Method copy

crates/c-api/include/wasm.hh:575–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573 }
574
575 auto copy() const -> Val {
576 if (is_ref() && impl_.ref != nullptr) {
577 // TODO(mvsc): MVSC cannot handle this:
578 // impl impl = {.ref = impl_.ref->copy().release()};
579 impl impl;
580 impl.ref = impl_.ref->copy().release();
581 return Val(kind_, impl);
582 } else {
583 return Val(kind_, impl_);
584 }
585 }
586};
587
588

Callers

nothing calls this directly

Calls 4

is_refFunction · 0.85
releaseMethod · 0.80
ValClass · 0.70
copyMethod · 0.45

Tested by

no test coverage detected