summaryrefslogtreecommitdiff
path: root/crates/parser/src/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser/src/module.rs')
-rw-r--r--crates/parser/src/module.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/parser/src/module.rs b/crates/parser/src/module.rs
index 5bc6a7e..f5c01ac 100644
--- a/crates/parser/src/module.rs
+++ b/crates/parser/src/module.rs
@@ -112,7 +112,6 @@ impl ModuleReader {
if !self.table_types.is_empty() {
return Err(ParseError::DuplicateSection("Table section".into()));
}
-
debug!("Found table section");
validator.table_section(&reader)?;
self.table_types = conversion::convert_module_tables(reader)?;
@@ -140,6 +139,13 @@ impl ModuleReader {
validator.data_section(&reader)?;
self.data = conversion::convert_module_data_sections(reader)?;
}
+ DataCountSection { count, range } => {
+ debug!("Found data count section");
+ if !self.data.is_empty() {
+ return Err(ParseError::DuplicateSection("Data count section".into()));
+ }
+ validator.data_count_section(count, &range)?;
+ }
CodeSectionStart { count, range, .. } => {
debug!("Found code section ({} functions)", count);
if !self.code.is_empty() {