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

Function EXPECTED_TRY

lib/loader/ast/segment.cpp:12–14  ·  view source on GitHub ↗

Check whether the first byte is the reftype in table type.

Source from the content-addressed store, hash-verified

10Expect<void> Loader::loadSegment(AST::TableSegment &TabSeg) {
11 // Check whether the first byte is the reftype in table type.
12 EXPECTED_TRY(uint8_t CheckByte, FMgr.peekByte().map_error([this](auto E) {
13 return logLoadError(E, FMgr.getLastOffset(), ASTNodeAttr::Seg_Table);
14 }));
15
16 if (CheckByte == 0x40U) {
17 // Table segment case is for FunctionReferences proposal.

Callers 1

loadSegmentMethod · 0.70

Calls 1

getLastOffsetMethod · 0.80

Tested by

no test coverage detected