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

Function resolveCommand

test/spec/spectest.cpp:76–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76SpecTest::CommandID resolveCommand(std::string_view Name) {
77 static const std::unordered_map<std::string_view, SpecTest::CommandID,
78 Hash::Hash>
79 CommandMapping = {
80 {"module"sv, SpecTest::CommandID::Module},
81 {"module_definition"sv, SpecTest::CommandID::ModuleDefinition},
82 {"module_instance"sv, SpecTest::CommandID::ModuleInstance},
83 {"action"sv, SpecTest::CommandID::Action},
84 {"register"sv, SpecTest::CommandID::Register},
85 {"assert_return"sv, SpecTest::CommandID::AssertReturn},
86 {"assert_trap"sv, SpecTest::CommandID::AssertTrap},
87 {"assert_exhaustion"sv, SpecTest::CommandID::AssertExhaustion},
88 {"assert_malformed"sv, SpecTest::CommandID::AssertMalformed},
89 {"assert_invalid"sv, SpecTest::CommandID::AssertInvalid},
90 {"assert_unlinkable"sv, SpecTest::CommandID::AssertUnlinkable},
91 {"assert_uninstantiable"sv,
92 SpecTest::CommandID::AssertUninstantiable},
93 {"assert_exception"sv, SpecTest::CommandID::AssertException},
94 {"thread"sv, SpecTest::CommandID::Thread},
95 {"wait"sv, SpecTest::CommandID::Wait},
96 };
97 if (auto Iter = CommandMapping.find(Name); Iter != CommandMapping.end()) {
98 return Iter->second;
99 }
100 return SpecTest::CommandID::Unknown;
101}
102
103template <typename T, size_t N = sizeof(T)>
104static void parseSIMDLanes(WasmEdge::uint128_t &V128,

Callers 1

processCommandsMethod · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected