MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / memoryCopy

Function memoryCopy

test/meminstance/MemInstanceTest.cpp:126–132  ·  view source on GitHub ↗

Helper: call memory.copy(dst, src, len).

Source from the content-addressed store, hash-verified

124
125/// Helper: call memory.copy(dst, src, len).
126static void memoryCopy(VM::VM &VM, uint32_t Dst, uint32_t Src, uint32_t Len) {
127 std::vector<ValVariant> Params = {Dst, Src, Len};
128 std::vector<ValType> ParamTypes = {I32Type, I32Type, I32Type};
129 auto Res = VM.execute("copy", Params, ParamTypes);
130 ASSERT_TRUE(Res) << "memory.copy failed: dst=" << Dst << " src=" << Src
131 << " len=" << Len;
132}
133
134/// Helper: read a range of bytes from memory.
135static std::vector<uint8_t> readMemory(VM::VM &VM, uint32_t Start,

Callers 1

TEST_FFunction · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected