summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 50b78fbae..1f6222cba 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -322,7 +322,8 @@ enum Section {
Start = 8,
Element = 9,
Code = 10,
- Data = 11
+ Data = 11,
+ DataCount = 12,
};
enum SegmentFlag {
@@ -891,6 +892,7 @@ public:
void writeFunctions();
void writeGlobals();
void writeExports();
+ void writeDataCount();
void writeDataSegments();
std::unordered_map<Name, Index> mappedFunctions; // name of the Function => index. first imports, then internals
@@ -1083,8 +1085,14 @@ public:
std::map<Index, Name> mappedGlobals; // index of the Global => name. first imported globals, then internal globals
Name getGlobalName(Index index);
+ void validateBinary(); // validations that cannot be performed on the Module
void processFunctions();
+
+ size_t dataCount = 0;
+ bool hasDataCount = false;
+
void readDataSegments();
+ void readDataCount();
std::map<Index, std::vector<Index>> functionTable;