| 1246 | } |
| 1247 | |
| 1248 | void BinaryWriter::WriteMemory(const Memory* memory) { |
| 1249 | uint32_t flags = ComputeLimitsFlags(&memory->page_limits); |
| 1250 | const bool custom_page_size = memory->page_size != WABT_DEFAULT_PAGE_SIZE; |
| 1251 | flags |= custom_page_size ? WABT_BINARY_LIMITS_HAS_CUSTOM_PAGE_SIZE_FLAG : 0; |
| 1252 | WriteLimitsFlags(stream_, flags); |
| 1253 | WriteLimitsData(stream_, &memory->page_limits); |
| 1254 | if (custom_page_size) { |
| 1255 | WriteU32Leb128(stream_, log2_u32(memory->page_size), "memory page size"); |
| 1256 | } |
| 1257 | } |
| 1258 | |
| 1259 | void BinaryWriter::WriteGlobalHeader(const Global* global) { |
| 1260 | WriteType(stream_, global->type); |
nothing calls this directly
no test coverage detected