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

Method readByte

lib/loader/filemgr.cpp:65–74  ·  view source on GitHub ↗

Read one byte. See "include/loader/filemgr.h".

Source from the content-addressed store, hash-verified

63
64// Read one byte. See "include/loader/filemgr.h".
65Expect<Byte> FileMgr::readByte() {
66 if (unlikely(Status != ErrCode::Value::Success)) {
67 return Unexpect(Status);
68 }
69 // Set the flag to the start offset.
70 LastPos = Pos;
71 // Check whether reading exceeds the data or section boundary.
72 EXPECTED_TRY(testRead(1));
73 return Data[Pos++];
74}
75
76// Read bytes. See "include/loader/filemgr.h".
77Expect<std::vector<Byte>> FileMgr::readBytes(size_t SizeToRead) {

Callers 15

loadDescMethod · 0.80
loadInstructionMethod · 0.80
loadRefTypeMethod · 0.80
loadValTypeMethod · 0.80
loadMutabilityMethod · 0.80
loadTypeMethod · 0.80
loadSegmentMethod · 0.80
loadSectionMethod · 0.80
section.cppFile · 0.80
loadModuleMethod · 0.80
loadModuleAOTMethod · 0.80
loadTypeMethod · 0.80

Calls 3

unlikelyFunction · 0.85
UnexpectFunction · 0.85
EXPECTED_TRYFunction · 0.50

Tested by 1

TESTFunction · 0.64