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

Method getCoreSortIndexSize

lib/validator/component_context.cpp:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26uint32_t ComponentContext::Context::getCoreSortIndexSize(
27 Sort::CoreSortType ST) const noexcept {
28 switch (ST) {
29 case Sort::CoreSortType::Func:
30 return static_cast<uint32_t>(CoreFuncs.size());
31 case Sort::CoreSortType::Table:
32 return static_cast<uint32_t>(CoreTables.size());
33 case Sort::CoreSortType::Memory:
34 return static_cast<uint32_t>(CoreMemories.size());
35 case Sort::CoreSortType::Global:
36 return static_cast<uint32_t>(CoreGlobals.size());
37 case Sort::CoreSortType::Tag:
38 return CoreTagCount;
39 case Sort::CoreSortType::Type:
40 return static_cast<uint32_t>(CoreTypes.size());
41 case Sort::CoreSortType::Module:
42 return static_cast<uint32_t>(CoreModules.size());
43 case Sort::CoreSortType::Instance:
44 return static_cast<uint32_t>(CoreInstances.size());
45 default:
46 return 0;
47 }
48}
49
50uint32_t ComponentContext::incSortIndexSize(Sort::SortType ST) noexcept {
51 switch (ST) {

Callers 3

validateMethod · 0.45
validateCanonOptionsMethod · 0.45
validateCanonLiftMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected