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

Method checkInstrs

lib/validator/formchecker.cpp:160–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160Expect<void> FormChecker::checkInstrs(AST::InstrView Instrs) {
161 // Validate instructions
162 for (auto &Instr : Instrs) {
163 EXPECTED_TRY(checkInstr(Instr).map_error([&Instr](auto E) {
164 spdlog::error(
165 ErrInfo::InfoInstruction(Instr.getOpCode(), Instr.getOffset()));
166 return E;
167 }));
168 }
169 return {};
170}
171
172Expect<void> FormChecker::checkInstr(const AST::Instruction &Instr) {
173 // Note: The instructions and their immediates have passed proposal

Callers

nothing calls this directly

Calls 5

InfoInstructionClass · 0.85
EXPECTED_TRYFunction · 0.50
errorFunction · 0.50
getOpCodeMethod · 0.45
getOffsetMethod · 0.45

Tested by

no test coverage detected