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

Method runArrayGetOp

lib/executor/engine/refInstr.cpp:210–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210Expect<void> Executor::runArrayGetOp(Runtime::StackManager &StackMgr,
211 const uint32_t TypeIdx,
212 const AST::Instruction &Instr,
213 const bool IsSigned) const noexcept {
214 const uint32_t Idx = StackMgr.pop().get<uint32_t>();
215 const RefVariant Ref = StackMgr.getTop().get<RefVariant>();
216 EXPECTED_TRY(
217 auto Val,
218 arrayGet(StackMgr, Ref, TypeIdx, Idx, IsSigned).map_error([&](auto E) {
219 return logError(E, Instr,
220 [&]() { return logArrayOOB(E, Idx, 1, Ref); });
221 }));
222 StackMgr.getTop() = Val;
223 return {};
224}
225
226Expect<void>
227Executor::runArraySetOp(Runtime::StackManager &StackMgr, const ValVariant &Val,

Callers

nothing calls this directly

Calls 1

popMethod · 0.80

Tested by

no test coverage detected