MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / copy

Method copy

include/wasm.hh:569–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567 }
568
569 auto copy() const -> Val {
570 if (is_ref() && impl_.ref != nullptr) {
571 // TODO(mvsc): MVSC cannot handle this:
572 // impl impl = {.ref = impl_.ref->copy().release()};
573 impl impl;
574 impl.ref = impl_.ref->copy().release();
575 return Val(kind_, impl);
576 } else {
577 return Val(kind_, impl_);
578 }
579 }
580};
581
582

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected