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

Method isLocalResource

include/validator/component_context.h:307–310  ·  view source on GitHub ↗

Returns true iff the type index is a resource defined in the current scope (not imported, not an outer-alias). Required for canon resource.new and resource.rep validation.

Source from the content-addressed store, hash-verified

305 /// scope (not imported, not an outer-alias). Required for canon
306 /// resource.new and resource.rep validation.
307 bool isLocalResource(uint32_t Idx) const noexcept {
308 const auto &Ctx = getCurrentContext();
309 return Ctx.DefinedResources.find(Idx) != Ctx.DefinedResources.end();
310 }
311
312 const AST::Component::InstanceType *
313 getInstanceType(uint32_t Idx) const noexcept {

Callers 2

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected