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

Method deep_copy

include/wasm.hh:133–137  ·  view source on GitHub ↗

TODO: This can't be used for e.g. vec

Source from the content-addressed store, hash-verified

131
132 // TODO: This can't be used for e.g. vec<Val>
133 auto deep_copy() const -> vec {
134 auto v = vec(size_);
135 if (v) for (size_t i = 0; i < size_; ++i) v.data_[i] = data_[i]->copy();
136 return v;
137 }
138
139 static auto make_uninitialized(size_t size = 0) -> vec {
140 return vec(size);

Callers 2

runFunction · 0.80
copyMethod · 0.80

Calls 2

vecClass · 0.85
copyMethod · 0.45

Tested by

no test coverage detected