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

Method runArrayCopyOp

lib/executor/engine/refInstr.cpp:266–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266Expect<void>
267Executor::runArrayCopyOp(Runtime::StackManager &StackMgr, const uint32_t Cnt,
268 const uint32_t DstTypeIdx, const uint32_t SrcTypeIdx,
269 const AST::Instruction &Instr) const noexcept {
270 const uint32_t SrcIdx = StackMgr.pop().get<uint32_t>();
271 const RefVariant SrcRef = StackMgr.pop().get<RefVariant>();
272 const uint32_t DstIdx = StackMgr.pop().get<uint32_t>();
273 const RefVariant DstRef = StackMgr.pop().get<RefVariant>();
274 EXPECTED_TRY(arrayCopy(StackMgr, DstRef, DstTypeIdx, DstIdx, SrcRef,
275 SrcTypeIdx, SrcIdx, Cnt)
276 .map_error([&](auto E) {
277 return logError(E, Instr, [&]() {
278 return logDoubleArrayOOB(E, SrcIdx, Cnt, SrcRef, DstIdx,
279 Cnt, DstRef);
280 });
281 }));
282 return {};
283}
284
285Expect<void> Executor::runArrayInitDataOp(
286 Runtime::StackManager &StackMgr, const uint32_t Cnt, const uint32_t TypeIdx,

Callers

nothing calls this directly

Calls 4

logErrorFunction · 0.85
logDoubleArrayOOBFunction · 0.85
popMethod · 0.80
EXPECTED_TRYFunction · 0.70

Tested by

no test coverage detected