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

Method getRefs

include/runtime/instance/table.h:96–106  ·  view source on GitHub ↗

Get slice of Refs[Offset : Offset + Length - 1]

Source from the content-addressed store, hash-verified

94
95 /// Get slice of Refs[Offset : Offset + Length - 1]
96 Expect<Span<const RefVariant>> getRefs(const uint64_t Offset,
97 const uint64_t Length) const noexcept {
98 // Check the accessing boundary.
99 if (!checkAccessBound(Offset, Length)) {
100 spdlog::error(ErrCode::Value::TableOutOfBounds);
101 spdlog::error(ErrInfo::InfoBoundary(Offset, Length, getSize()));
102 return Unexpect(ErrCode::Value::TableOutOfBounds);
103 }
104 return Span<const RefVariant>(
105 Refs.begin() + static_cast<std::ptrdiff_t>(Offset), Length);
106 }
107
108 /// Replace the Refs[Dst :] by Slice[Src : Src + Length)
109 Expect<void> setRefs(Span<const RefVariant> Slice, const uint64_t Dst,

Callers 7

initTableMethod · 0.45
logTableOOBFunction · 0.45
arrayNewElemMethod · 0.45
arrayInitElemMethod · 0.45
runTableInitOpMethod · 0.45
runTableCopyOpMethod · 0.45
proxyTableInitMethod · 0.45

Calls 4

InfoBoundaryClass · 0.85
UnexpectFunction · 0.85
errorFunction · 0.50
beginMethod · 0.45

Tested by

no test coverage detected