diff options
author | Ben Smith <binjimin@gmail.com> | 2019-01-23 15:12:42 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 15:12:42 -0800 |
commit | 12e8de7f5b3a5be01e3e6347c64168ea34b85a38 (patch) | |
tree | 65d9e0c3f81620a2931f48de214f14d5cf97eab1 /src/binary-writer.cc | |
parent | c37eef7de4df2b4d523b8b1daecf5207a0da4ec2 (diff) | |
download | wabt-12e8de7f5b3a5be01e3e6347c64168ea34b85a38.tar.gz wabt-12e8de7f5b3a5be01e3e6347c64168ea34b85a38.tar.bz2 wabt-12e8de7f5b3a5be01e3e6347c64168ea34b85a38.zip |
Implement parsing and writing of DataCount section (#998)
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r-- | src/binary-writer.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc index b8fa1702..b6c33ccc 100644 --- a/src/binary-writer.cc +++ b/src/binary-writer.cc @@ -993,6 +993,12 @@ Result BinaryWriter::WriteModule() { EndSection(); } + if (options_.features.bulk_memory_enabled()) { + BeginKnownSection(BinarySection::DataCount); + WriteU32Leb128(stream_, module_->data_segments.size(), "data count"); + EndSection(); + } + if (num_funcs) { BeginKnownSection(BinarySection::Code); WriteU32Leb128(stream_, num_funcs, "num functions"); |