| 670 | } |
| 671 | |
| 672 | Result 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 | |
| 682 | Result BinaryReaderInterp::OnGlobalCount(Index count) { |
| 683 | module_.globals.reserve(std::min(count, kMaxPreallocatedBufferSize)); |
no test coverage detected