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

Method getDataInstByIdx

lib/executor/helper.cpp:435–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435Runtime::Instance::DataInstance *
436Executor::getDataInstByIdx(Runtime::StackManager &StackMgr,
437 const uint32_t Idx) const {
438 const auto *ModInst = StackMgr.getModule();
439 // When the top frame is a dummy frame, the instance cannot be found.
440 if (unlikely(ModInst == nullptr)) {
441 return nullptr;
442 }
443 return ModInst->unsafeGetData(Idx);
444}
445
446TypeCode Executor::toBottomType(Runtime::StackManager &StackMgr,
447 const ValType &Type) const {

Callers

nothing calls this directly

Calls 3

unlikelyFunction · 0.85
unsafeGetDataMethod · 0.80
getModuleMethod · 0.45

Tested by

no test coverage detected