MCPcopy Create free account
hub / github.com/WebAssembly/wabt / OnMemory

Method OnMemory

src/interp/binary-reader-interp.cc:672–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670}
671
672Result BinaryReaderInterp::OnMemory(Index index,
673 const Limits* limits,
674 uint32_t page_size) {
675 CHECK_RESULT(validator_.OnMemory(GetLocation(), *limits, page_size));
676 MemoryType memory_type{*limits, page_size};
677 module_.memories.push_back(MemoryDesc{memory_type});
678 memory_types_.push_back(memory_type);
679 return Result::Ok;
680}
681
682Result BinaryReaderInterp::OnGlobalCount(Index count) {
683 module_.globals.reserve(std::min(count, kMaxPreallocatedBufferSize));

Callers 1

OnImportMemoryMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected