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

Method runArrayLenOp

lib/executor/engine/refInstr.cpp:240–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238}
239
240Expect<void>
241Executor::runArrayLenOp(ValVariant &Val,
242 const AST::Instruction &Instr) const noexcept {
243 const auto *Inst =
244 Val.get<RefVariant>().getPtr<Runtime::Instance::ArrayInstance>();
245 if (Inst == nullptr) {
246 return Unexpect(logError(ErrCode::Value::AccessNullArray, Instr));
247 }
248 Val.emplace<uint32_t>(Inst->getLength());
249 return {};
250}
251
252Expect<void>
253Executor::runArrayFillOp(Runtime::StackManager &StackMgr, const uint32_t Cnt,

Callers

nothing calls this directly

Calls 3

UnexpectFunction · 0.85
logErrorFunction · 0.85
getLengthMethod · 0.80

Tested by

no test coverage detected