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

Method runArraySetOp

lib/executor/engine/refInstr.cpp:226–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226Expect<void>
227Executor::runArraySetOp(Runtime::StackManager &StackMgr, const ValVariant &Val,
228 const uint32_t TypeIdx,
229 const AST::Instruction &Instr) const noexcept {
230 const uint32_t Idx = StackMgr.pop().get<uint32_t>();
231 const RefVariant Ref = StackMgr.pop().get<RefVariant>();
232 EXPECTED_TRY(
233 arraySet(StackMgr, Ref, Val, TypeIdx, Idx).map_error([&](auto E) {
234 return logError(E, Instr,
235 [&]() { return logArrayOOB(E, Idx, 1, Ref); });
236 }));
237 return {};
238}
239
240Expect<void>
241Executor::runArrayLenOp(ValVariant &Val,

Callers

nothing calls this directly

Calls 4

logErrorFunction · 0.85
logArrayOOBFunction · 0.85
popMethod · 0.80
EXPECTED_TRYFunction · 0.70

Tested by

no test coverage detected