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

Method setRefAddr

include/runtime/instance/table.h:166–174  ·  view source on GitHub ↗

Set the elem address.

Source from the content-addressed store, hash-verified

164
165 /// Set the elem address.
166 Expect<void> setRefAddr(const uint64_t Idx, const RefVariant &Val) {
167 if (Idx >= Refs.size()) {
168 spdlog::error(ErrCode::Value::TableOutOfBounds);
169 spdlog::error(ErrInfo::InfoBoundary(Idx, 1, getSize()));
170 return Unexpect(ErrCode::Value::TableOutOfBounds);
171 }
172 Refs[Idx] = Val;
173 return {};
174 }
175
176private:
177 /// \name Data of table instance.

Callers 3

runTableSetOpMethod · 0.80
proxyTableSetMethod · 0.80

Calls 4

InfoBoundaryClass · 0.85
UnexpectFunction · 0.85
errorFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected